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

Re: [Libguestfs] [PATCH] Recognise cd-rom devices in devsparts.c

To see if a binary is marked with an executable stack, do:

  readelf -l binary | grep GNU_STACK

and look for 'RWE'.

  RWE = executable stack (bad)
  RW  = not executable stack (good)

  $ readelf -l /bin/ls | grep GNU_STACK
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

(You can only do this on the final binary, not on object files)

Note that even a single object file in the entire binary having an
executable stack means the whole binary will have an executable stack.
So we have to care about 'purity' of every piece of code.


Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html

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