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

Richard W.M. Jones rjones at redhat.com
Tue Aug 4 06:03:13 UTC 2009


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)

eg:
  $ 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.

Rich.

-- 
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




More information about the Libguestfs mailing list