This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/2] libc-abis: Define ABSOLUTE ABI [BZ #19818][BZ #23307]
- From: Carlos O'Donell <carlos at redhat dot com>
- To: "Maciej W. Rozycki" <macro at mips dot com>, libc-alpha at sourceware dot org
- Cc: Florian Weimer <fweimer at redhat dot com>, Alan Modra <amodra at gmail dot com>
- Date: Tue, 3 Jul 2018 09:52:57 -0400
- Subject: Re: [PATCH 2/2] libc-abis: Define ABSOLUTE ABI [BZ #19818][BZ #23307]
- References: <alpine.DEB.firstname.lastname@example.org> <alpine.DEB.email@example.com> <firstname.lastname@example.org> <alpine.DEB.email@example.com> <firstname.lastname@example.org> <alpine.DEB.email@example.com> <firstname.lastname@example.org> <alpine.DEB.email@example.com> <alpine.DEB.firstname.lastname@example.org>
On 06/29/2018 12:29 PM, Maciej W. Rozycki wrote:
> On Thu, 28 Jun 2018, Maciej W. Rozycki wrote:
>>>> + /* Mark that we need support for absolute symbols in the dynamic loader.
>>>> + if (htab != NULL && htab->use_absolute_zero)
>>>> + i_ehdrp->e_ident[EI_ABIVERSION] = MIPS_LIBC_ABI_ABSOLUTE;
>>>> _bfd_elf_post_process_headers (abfd, link_info);
>>>> and then `htab->use_absolute_zero' will be TRUE iff a GOT relocation has
>>>> been calculated to actually refer to a specially-created absolute symbol
>>>> used to address the issue covered by binutils PR ld/21375.
>>>> The flag will be FALSE if code has been relaxed to avoid referring the
>>>> GOT (by using immediate zero instead), in which case no absolute symbol
>>>> will have been specially created.
>>>> Does this explanation clear your concern?
>>> Yes, I think this is okay then.
> Any further input? Have we reached consensus?
> If so, then I think a NEWS entry will be due, such as:
> * The maximum libc ABI supported has been increased to reflect absolute
> symbol support. This can be used by the static linker in the ELF file
> header's EI_ABIVERSION field to indicate such support is required.
* The GNU C Library now has correct support for ABSOLUTE symbols
(SHN_ABS-relative symbols). Previously such ABSOLUTE symbols were relocated
inconsistently or wrongly in some cases. The GNU linker has been enhanced to
fix this issue, but it must communicate these newer semantics to the dynamic
loader by setting the ELF file's identification (EI_ABIVERSION field) to
indicate such support is required.
> which I will include in the actual commit.
This looks good to me.
I don't see an easy way around this problem.
I think bumping EI_ABIVERSION is the best cost/value solution there.