This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] libc-abis: Define ABSOLUTE ABI [BZ #19818][BZ #23307]


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.
>>
>>  Great!
> 
>  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.

Suggest:

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

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]