This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: dwarf2 and linker relaxation problem
Dmitry Diky <ddiky@alarity.com> writes:
> That's right.
>
> > Seems like a clue that the assembler didn't emit relocations
> > where it must, for linker relaxation.
>
> But when I want to emit a debug info for relaxable fragment I just call
> dwarf2_emit_insn(0);
> Then I call frag_var(...), etc.
> I do not relax in assembler cause it may be a source of some error and relax
> in linker. In there I adjust any symbols referenced into relaxable sections
> and I do not see any symbols addresses into relaxable section from debug
> section. So then question is: how to force dwarf2 debug info make a footprint
> in debuggable section?
Look at gas/tc-sh.[ch]. In particular TC_FORCE_RELOCATION_SUB_LOCAL
and TC_FORCE_RELOCATION_LOCAL. And in general any use of the global
variable sh_relax.
Ian