RFC: Add GNU_PROPERTY_NEED_PHDRS
H.J. Lu
hjl.tools@gmail.com
Fri Sep 28 23:05:00 GMT 2018
On Fri, Sep 28, 2018 at 7:30 AM, Rich Felker <dalias@libc.org> wrote:
> On Fri, Sep 28, 2018 at 06:42:52AM -0700, H.J. Lu wrote:
>
>> Dynamic loader has no problem. The problem is kernel passes
>> AT_PHDR to main, which points to the unmmaped address. We can
>> ask for kernel change or make kernel happy.
>
> Kernel change does not help because nobody is obligated to use a new
> kernel. Binutils would be producing binaries that don't work on
> existing kernels (if the note hack were reverted or if similar changes
> were added to other archs without a note hack; right now of course
> it's working again).
True.
>> My current .note.gnu.property patch only works for x86. We can
>> add
>>
>> #define GNU_PROPERTY_PHDRS 3
>>
>> so that it can be used for all targets.
>
> What would this do?
>
These are what I have in mind.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-add-GNU_PROPERTY_X86_FEATURE_2_NEEDED.patch
Type: text/x-patch
Size: 4576 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180928/dfd03ca6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-GNU_PROPERTY_NEED_PHDRS.patch
Type: text/x-patch
Size: 6841 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180928/dfd03ca6/attachment-0001.bin>
More information about the Binutils
mailing list