public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] elf: Add elf checks for main executable
Date: Mon, 6 Dec 2021 18:07:06 -0300	[thread overview]
Message-ID: <6386c389-086d-e123-d4d6-a97777f207ed@linaro.org> (raw)
In-Reply-To: <877dchlbb8.fsf@oldenburg.str.redhat.com>



On 06/12/2021 17:37, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> On 06/12/2021 16:22, H.J. Lu wrote:
>>> On Mon, Dec 6, 2021 at 11:09 AM Florian Weimer <fweimer@redhat.com> wrote:
>>>>
>>>> * Adhemerval Zanella:
>>>>
>>>>> +static void
>>>>> +modify_abiversion (ElfW(Ehdr) *ehdr)
>>>>> +{
>>>>> +  ehdr->e_ident[EI_ABIVERSION] = LIBC_ABI_MAX;
>>>>> +}
>>>>
>>>> So this is eventually controlled by the libc-abis file, right?
>>>>
>>>> I *thought* that the consensus was that binutils should bump version if
>>>> absolute symbols are used.  But I don't see that in the absolute symbol
>>>> tests.
>>>>
>>>> Is this really doing anything?
>>>>
>>>
>>> EI_ABIVERSION check works on executables created by the new linker
>>> which bumps EI_ABIVERSION.  This complements the existing
>>> EI_ABIVERSION check on DSOs.  This is orthogonal to the ABI version
>>> check for existing ld.so binaries which needs an ABIVERSION version.
>>>
>>
>> Currently only mips does actually set and checks different EI_ABIVERSION
>> through VALID_ELF_ABIVERSION. For instance, -Wl,--hash-style=gnu with
>> mips64 will set EI_ABIVERSION to 5.
> 
> What surprised me is that binutils does not seem to *generate* the bump
> for ABSOLUTE.  Not so much the lack of checking in glibc.

It does, but only for specific configurations.  bintutils does have a
testcase for it, pr21375*, but not all configurations does bump because
they do not require ABS relocations (for instance, for n64 -mmicromips
--defsym hidn=1 does set the ABI version to 4).

  reply	other threads:[~2021-12-06 21:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 15:03 Adhemerval Zanella
2021-11-19 15:33 ` H.J. Lu
2021-11-19 16:05   ` H.J. Lu
2021-11-19 17:06     ` Adhemerval Zanella
2021-12-06 19:03 ` H.J. Lu
2021-12-06 19:09 ` Florian Weimer
2021-12-06 19:22   ` H.J. Lu
2021-12-06 20:31     ` Adhemerval Zanella
2021-12-06 20:37       ` Florian Weimer
2021-12-06 21:07         ` Adhemerval Zanella [this message]
2021-12-07 15:45           ` Florian Weimer
2021-12-07 17:35             ` Adhemerval Zanella
2021-12-08  0:01               ` Fāng-ruì Sòng
2021-12-08 10:19                 ` Florian Weimer
2021-12-14  0:17                   ` Fāng-ruì Sòng
2021-12-14  9:03                     ` Florian Weimer
2021-12-14  9:09                       ` Fāng-ruì Sòng
2021-12-14  9:18                         ` Florian Weimer
2021-12-14 19:03                           ` Fangrui Song
2021-12-14 12:28                         ` Adhemerval Zanella
2021-12-14 12:23                       ` Adhemerval Zanella
2021-12-14 19:24                         ` Fangrui Song
2021-12-14 21:07                           ` Adhemerval Zanella
2021-12-14 21:30                             ` Fangrui Song
2021-12-14 21:53                               ` Florian Weimer
2021-12-14 23:08                                 ` Fangrui Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6386c389-086d-e123-d4d6-a97777f207ed@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).