tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [FOUND] String offset errors on evbarm 8.99 [PR 54159]

On Mon, Aug 05, 2019 at 06:29:31PM +0200, Joerg Sonnenberger wrote:
> On Mon, Aug 05, 2019 at 05:39:31PM +0200, wrote:
> > On Mon, Aug 05, 2019 at 03:10:37PM +0200, Martin Husemann wrote:
> > > On Mon, Aug 05, 2019 at 12:35:58PM +0200, wrote:
> > > > Linking directly there is no problem. So the question is to obtain _how_
> > > > the linker is invoked by the pkg building.
> > > 
> > > Check work/.work.log ?
> > 
> > That was the info needed! Thanks! (I added too PKG_LEVEL_DEBUG=2 
> > suggested by Greg Troxel).
> > 
> > The offending option is this:
> > 
> >         -Wl,-retain-symbols-file -Wl,.libs/libp11-kit.exp
> > 
> > ditto: it discards every symbol that is not in this file!
> > 
> > So question: why is there such a thing when debug is asked for? To
> > "just" debug the library without its interactions with the dshared libs
> > it's linked to?
> Can you try adding $a, $t, $t.x and $d to that list and see if that
> fixes the problem?

To recapitulate: with the exported symbol file, the .strtab is 102
entries: $a, $d and the 100 strings present in the exported symbol file.
ld complains that 229 symbols have indices in the strtab passing the
size of the section.

If I add $t and $t.x, no change (they are not present).

If I add $a, the name of the object files are added : the fully
qualified /data/m/tmp/olimex/destdir.evbarm/usr/lib/crtbeginS.o, the
relative of the object file passed on the command line, and the unities
in the static archives (argv.o, attrs.o etc.) that is 31 strings more.
ld complains about 200 symbols with wrong indices (so this is not
exactly 229 - 31!).

If I add $d, I have the same additions as $a plus fully qualified
crti.o and fully qualified crtbeginS.o that is 33 strings more.
ld complains about 196 symbols with wrong indices (so with 2 more 
strings there are 4 less complains... but this time this is 229 - 33!).

I have not more time this week for this. I will have some spare time
next week.

So next week, unless someone knowing already the binutils code can
tackle the task before, I will create a dummy library to sort out
if this is a general problem with the option or if the bug is triggered
by something about the names of the symbols in the present library, and
I will track the handling of the offending option in the ld sources.

        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Home | Main Index | Thread Index | Old Index