This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] elf/elf.h: Add new 386 and X86_64 relocations from binutils.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 29 Jan 2016 04:56:16 -0800
- Subject: Re: [PATCH] elf/elf.h: Add new 386 and X86_64 relocations from binutils.
- Authentication-results: sourceware.org; auth=none
- References: <1453985706-30030-1-git-send-email-mjw at redhat dot com> <CAMe9rOrowqzSm5dsYmfUnfu+sxPh0_71GC1UBJNuJxtOXk5RwA at mail dot gmail dot com> <20160129085359 dot GF2721 at blokker dot redhat dot com>
On Fri, Jan 29, 2016 at 12:53 AM, Mark Wielaard <mjw@redhat.com> wrote:
> On Thu, Jan 28, 2016 at 05:03:28AM -0800, H.J. Lu wrote:
>> On Thu, Jan 28, 2016 at 4:55 AM, Mark Wielaard <mjw@redhat.com> wrote:
>> > The following new 386 and X86_64 were added to binutils. They are
>> > non-dynamic relocations, so don't need direct handling in glibc.
>> > But other programs, like elfutils, use the glibc elf.h definitions
>> > for the names and numbers when inspecting ET_REL files.
>> >
>> > R_386_GOT32X was proposed in
>> > https://groups.google.com/forum/#!topic/ia32-abi/GbJJskkid4I
>> >
>> > X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX were proposed in
>> > https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0
>> >
>> > There also used to be R_X86_64_PC32_BND (39) and R_X86_64_PLT32_BND (40)
>> > but those already got deprecated and now the numbers are simply reserved.
>>
>> We can't use them for anything else and linker still supports them, But
>> assembler won't generate them.
>
> OK, if we cannot reuse them, then it makes sense to just add them
> and mark them deprecated in the comments. Then at least we got the
> name and number for tools to recognize them.
>
I prefer to leave them out since tools won't know how to handle them if
they haven't known already.
--
H.J.