http://sourceware.org/bugzilla/show_bug.cgi?id=13314
Bug #: 13314 Summary: ICF clashes with section ordering Product: binutils Version: 2.23 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: mh-sourcew...@glandium.org CC: ccout...@google.com Classification: Unclassified When linking with ICF and section ordering, the resulting order may not correspond to what is requested. $ cat <<EOF > test.c int foo(void) {return 0;} int bar(void) {return 42;} int baz(void) {return 42;} EOF $ cat <<EOF > order .text.baz .text.foo .text.* EOF $ gcc -o test.so -shared test.c -Wl,--icf=all -Wl,--print-icf-sections -fPIC -ffunction-sections -Wl,--section-ordering-file=order $ objdump -T test.so | grep '\(foo\|bar\|baz\)' | sort 0000000000000636 g DF .text 000000000000000b Base foo 0000000000000641 g DF .text 000000000000000b Base bar 0000000000000641 g DF .text 000000000000000b Base baz What happens is that baz is folded in bar, and when reordering, only bar is considered, not baz, so baz ends up after foo. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils