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] give .comment sections SHF_MERGE|SHF_STRINGS


On Fri, 2009-07-24 at 15:56 -0700, H.J. Lu wrote:
> > And it works for me (using gas in the path when building with gcc). As
> > long as the objects linked together all have the flags and entsize set
> > strings get merged. As soon as an older object is linked in that doesn't
> > have those set then not all duplicate strings are removed (as expected).
> >
> Does it work with "ld -r"?

ld -r only does partial linking. GNU ld doesn't merge the strings in the
section that gets combined into the partial link output file. But when
you do a final link of the partial link output file, then the strings in
the .comment section get merged.

GNU gold does do the string merging also with partial links. I don't
know why there is a difference or whether it really even matters when
the (final) merging happens.

Cheers,

Mark


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