If you define some symbols in different object files as being placed in a section with the same name (with __attribute__((section))), ld does not collect these objects together correctly if the --section-start option is used.
Instead, one of the shards from the first file on command line is placed at the correct address, and the rest shards of the same section are appended to either .text or .data sections. A simple example is attached. There are two object files a.o and b.o, every one contains a variable with __attribute__((section(".zzz"))). If they are linked together with option -Wl,--section-start=.zzz=0x800000, variable a is placed at the correct address 0x800000, but variable b is placed at the wrong address 0x6008b4 (in the .data section). -- Summary: ld --section-start does not work correctly if section is defined in multiple object files Product: binutils Version: 2.19 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: anpaza at mail dot ru CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=11304 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils