This is the mail archive of the binutils@sources.redhat.com 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: N_SO stabs corrupted after linking


Hi Nick,

From: Nick Clifton <nickc@redhat.com>
> I have ported binutils to a new target. The problem that I encounter
> is that the string fields of N_SO stabs are corrupted after
> linking. When I dump the debugging info by means of objdump -G I see
> that the N_SO entries of the .o files are correct but the N_SO entries
> of the linker output are corrupted. Only the two entries of the first
> module are correct. Any idea what could be wrong? Is it the port? Is
> it the linker script that I use?

It could be either, but I strongly suspect the port.  You will have to
investigate further to find out.  My guess is that when the stabs are
being merged together some excess, garbage bytes are being inserted
between the input sections, making the output stabs section corrupt.
It seems that the n_strx fields of stabs in the linker output are not set correctly, while these fields are correct in the assembler output. I had the impression that stabs are handled by ld or libbfd in the processor independent part.

Where in the code are the n_strx fields computed? (or variables from which n_strx is computed)

I have no .strtab section in my linkerscript. Would that help?

BTW, I am using binutils version 2.11.2 and my port generates ELF code.

Cheers,
Jan

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


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