This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
how to generate non-section-symbol related format of local labels for linker relaxation
- From: He Xiao <xiheasas at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 23 Feb 2010 19:50:57 +0800
- Subject: how to generate non-section-symbol related format of local labels for linker relaxation
Hi, all. I'm recently porting binutils 2-17 to my new arch. I'm stuck
on the linker relaxation phase. It is necessary for me to make local
labels to be something as global. What's more, it would be a relief
for me to cope with these local labels in such format as
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000010 R_TOP_RUI19_2 .LC1
other than the format which has adjusted to be against the section symbols
OFFSET TYPE VALUE
00000010 R_TOP_RUI19_2 .rodata+0x00000030
And it now comes to the function tc_fix_adjustable. I set the value to
zero, but the result is somewhat ridiculous:
OFFSET TYPE VALUE
00000010 R_TOP_RUI19_2 .LC1+0x00000030
The functions seems to work, but only replaces the previous section
symbol .rodata with the local symbol .LC1, is there someone to show me
how to fix up this problem?
BTW, could it refer to the string merging, as .LC1 represents a const string?
--
He Xiao
Shanghai Jiaotong University, 800 Dongchuang Road, Shanghai, China