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: Add STB_SECONDARY support


On Tue, Jul 03, 2012 at 04:38:29AM -0700, H.J. Lu wrote:
> This is not transparent to programmers.  Programmers shouldn't
> need to make any changes to their build environment other than
> installing a new binutils.

What on earth are you talking about?

You gave me your main usage requirement involving a library provided
by an ISV.  I showed how your hypothetical ISV can provide a library
as a specially marked archive containing the backup functions/data,
and have your hypothetical user link this, without any change other
than installing a new linker.  No ELF ABI changes needed.  Sounds
pretty simple to me.  Easy for the ISV too.  In fact, you wouldn't
even need to use weak symbols in the archive.

Now if your ISV wants to provide a "normal" library as well as a
"backup" one, but for some reason wants this to be available to the
linker in a single -lisv option, then just use a linker script as we
do for libc.so.  Packaging problem solved.  Hmm, and that leads to
another idea.  Simply invent a linker script keyword that says to link
a file last, and then you don't even need specially marked archives.

User links with -lisv as he always has.  ISV provides libisv.so (or
libisv.a), a script containing
	INPUT ( -lisvnormal )
	INPUT_AT_END ( -lisvbackup )

Remember also that I don't have to convince you that your ABI
extension is unnecessary.  You have to convince us that it is needed.

-- 
Alan Modra
Australia Development Lab, IBM


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