This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] x86: Don't remove empty x86 properties


> I misspoke in [1].  x86-64 psABI describes the correct behavior.

I see.

But I don't see the point of removing the property if it's missing in
any input. I didn't see much point in doing it for NEEDED bits either,
but at least it made slightly more sense to me than doing it for the
USED bits.

So that brings me back to a basic question: What is the purpose of the
USED bits?

Who or what is going to look at them, and what decision are they going
to make based on them?

The loader can't use them -- it only cares about NEEDED features
(which, as far as I can tell, are still not implemented). If the
loader can't use them, why are they in the .note.gnu.properties
section rather than the non-allocated GNU build attributes section?
(See [2].)

They can tell you if SSE instructions are used, for example, but they
can't tell you how many places they're used, what functions use them,
or even whether they're guarded by runtime CPUID tests. They might
even be used only in some unreachable function (which might even have
been garbage-collected!). You could easily add an option to objdump
that would scan the binary and give you much more useful information.

-cary

[2] https://fedoraproject.org/wiki/Toolchain/Watermark#Markup_for_ELF_objects


-cary


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