This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
partial linking and linker scripts
- From: Eddie Kohler <kohler at cs dot ucla dot edu>
- To: binutils at sourceware dot org
- Date: Wed, 02 Dec 2009 14:32:18 -0800
- Subject: partial linking and linker scripts
Hello all,
Apologies if this question is too elementary. I have object files with
.text.* sections for C++ inline functions and such. I'd like to do an partial
link to shift those sections into .text and remove the accompanying .group
sections. Is this possible? Scripts like the following do not seem to work;
the main .text section stays the same size and the .text.* sections remain.
ld -r -T foo.ld -o .... .....
foo.ld
=========
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
SECTIONS
{
.text 0 : {
*(.text .stub .text.* .gnu.linkonce.t.*)
} =0x90909090
.rodata 0 : {
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
.data 0 : {
*(.data)
}
.bss 0 : {
*(.bss)
}
/DISCARD/ : {
*(.eh_frame .group)
}
}
Thanks for any help,
Eddie Kohler