This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH RFC] gas/ELF: don't accumulate .type settings
- From: Nick Clifton <nickc at redhat dot com>
- To: Jan Beulich <JBeulich at suse dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "andrew dot cooper3 at citrix dot com" <andrew dot cooper3 at citrix dot com>
- Date: Mon, 1 Jul 2019 13:48:48 +0100
- Subject: Re: [PATCH RFC] gas/ELF: don't accumulate .type settings
- References: <email@example.com>
> Make the behavior predictable:
I think that this would be a great idea.
> Is a diagnostic needed (perhaps unless changing to @notype)?
Yes. If the type changes are significant then the user should
be informed. I also like the idea of not warning on changes to
@notype. Presumably this is to allow a deliberate change of
type to happen. We should document this feature however.
> What to do with @common? It getting set involves more than just setting
> STT_OBJECT. Should type changes on common symbols be disallowed?
Hmm, I am kind of leaning towards allowing changes from common to
something else, but not the other way around. (Assuming that the
new object is at least the same size as the common object). But
given what you have said, and having a look at the code myself, I
agree that it might be safer just to disallow any changes involving
> Is anyone aware of any other caveats here?
No - but one thing I have wanted to add to the assembler for some
time now is the ability to set the type to an arbitrary value.
Possibly restricted to the range of STT_LOOS .. STT_HIPROC. I have
tried a couple of times, but could not find a clean solution. I am
mentioning it now just as a suggestion that maybe the masking code
you are adding should skip symbols with target specific semantics.