This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gas relocations for .uleb128
What I am thinking is: in gas, add .leb128 processing (ie target specific)
and include the relocs if needed (ie similar to .long directive processing).
Is this ok?
The expression you showed calculated the difference of two symbols in
another section. That means your new reloc would need to reference
two symbols. How are you going to do that?
The cr16 port doing the above with two relocs and those will
be relocs will be resolved during the final link stage.
=== test.s:
===
.L1:
nop
.L2:
nop
.section .eh_frame,"a",@progbits
.L3:
.long .L2-.L1
==================
===
00000000 <.eh_frame>:
0: 00 00 illegal
0: R_CR16_SYM_DIF .L1
0: R_CR16_NUM32 .L2
===
NOTE: Above code changes yet to check-in gas cvs repo.
You need to use debug and eh_frame encoding that is friendly towards
relaxation. If you want to emit more efficiently encoded dwarf, add
support in the linker to rewrite dwarf. This isn't a trivial
exercise.