vtable is in the wrong segment
Nick Clifton
nickc@redhat.com
Tue Feb 13 14:19:00 GMT 2001
Hi Stephen,
: I am working on an embedded app (target=motorola-power-pc
: host=686-cygwin-pe) and under older gcc the the vtables were
: part of the text segment
:
: Now they have moved. Is there a way to have the linker combine
: segments?
You probably mean 'sections' not 'segments'. Segments are collections
of sections with the same attributes.
Anyway, the answer to your problem is probably to use a custom linker
script. In the script you can assign input sections to output
sections, so you can arrange for all of the incoming .text sections,
plus all of the incoming .vtable sections (or whatever section the
tables are now in) to be mapped into the single output .text section.
Have a read of the linker documentation. You are probably going to
want a linker script that looks a bit like this:
SECTIONS
{
.text { *(.text) *(.vtable) }
.data { *(.data) }
.bss { *(.bss) }
}
Cheers
Nick
More information about the Gcc
mailing list