RFC: Default to a start address of zero for shared libraries

Nick Clifton nickc@redhat.com
Fri Sep 17 16:20:33 GMT 2021


Hi Guys,

  Shared libraries and dynamic objects like plugins are not intended to
  be run by themselves, so it does not make sense to give them an entry
  address unless explicitly requested by their creator.  Hence I am
  proposing the attached patch which will modify the linker's heuristic
  for generating a start address such that the address of the start of
  the .text section would only be used for executables, not for shared
  objects:
  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld.entry-point-zero.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210917/b439b6ec/attachment.bin>
-------------- next part --------------

  The point of this is that it then makes it easier for the loader to
  detect mistaken attempts by users to run shared objects.

  Any objects or concerns ?

Cheers
  Nick
  


More information about the Binutils mailing list