[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: firefox-37, where to put


On Thu, 2 Apr 2015 15:06:42 -0400
Gene Heskett <gheskett@wdtv.com> wrote:

> "ldd" says its not an executable, but then says ldd itself is not, 
> while "file" says its (ldd) a Bourne Again SHell script.
> Am I compromized?

Let's see what all fuss is about.


wget -q


wget -q


sha512sum firefox-37.0.tar.bz2



And hurray, I've apparently got Genuine™ Mozilla Firefox 37.


tar xf firefox-37.0.tar.bz2 && cd firefox

And, finally

$ file firefox
firefox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID
[sha1]=0xd9c52e07232a78690be6d991546a12bb3668601d, stripped

$ file --mime-type firefox 
firefox: application/x-executable

So, it's definitely a binary. Yet,

$ ldd ./firefox
        not a dynamic executable

Why? That's why:

$ pwd
$ mount | grep /tmp
tmpfs on /tmp type tmpfs

Notice *noexec* here.

You see, ldd actually tries to execute a file (by using special hack in
ld.so, so that's OK). And of course, if you put an executable at
no-executable mountpoint, not only you won't be able to run it, ldd
also ceases to work.

And yes, ldd is a shell script. A customary way to prepend hacky
environment variables to executables is using shell wrappers. ldd is
just one of those.

Still, if ldd fails you - use objdump:

$ objdump -x firefox | grep NEED
  NEEDED               libpthread.so.0
  NEEDED               libdl.so.2
  NEEDED               librt.so.1
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  NEEDED               ld-linux-x86-64.so.2
  VERNEED              0x00000000004036c8
  VERNEEDNUM           0x0000000000000007

tl;dr version - move your firefox directory to filesystem mounted with
exec. Problem should solve itself.


Reply to: