[Bug ld/22677] ld -r --gc-section does not KEEP .init_array/.fini_array

2018-01-11 Thread d+sourcew...@adaptive-enterprises.com
https://sourceware.org/bugzilla/show_bug.cgi?id=22677 --- Comment #7 from David Leonard --- > Please could you try it out and let me know if it works for you. Confirmed. My tests pass without workaround. I used current master ld (89a7f793f1). Thanks! -- You are receiving this mail because: You

[Bug ld/22677] ld -r --gc-section does not KEEP .init_array/.fini_array

2018-01-10 Thread d+sourcew...@adaptive-enterprises.com
https://sourceware.org/bugzilla/show_bug.cgi?id=22677 --- Comment #3 from David Leonard --- Hi Nick, > This appears to be an artifact of the linker that you are using. If you > build an x86_64 linker using the FSF sources and run "ld --verbose" you > should see this as part of the output You a

[Bug ld/22677] ld -r --gc-section does not KEEP .init_array/.fini_array

2018-01-05 Thread d+sourcew...@adaptive-enterprises.com
https://sourceware.org/bugzilla/show_bug.cgi?id=22677 David Leonard changed: What|Removed |Added Summary|ld -r --gc-collect does not |ld -r --gc-section does not

[Bug ld/22677] ld -r --gc-collect does not KEEP .init_array/.fini_array

2018-01-05 Thread d+sourcew...@adaptive-enterprises.com
https://sourceware.org/bugzilla/show_bug.cgi?id=22677 --- Comment #1 from David Leonard --- Submitted too early, sorry. I mean --gc-section not --gc-collect. Example $ cat L.c int L4var = 4; int L5var; int L5init() { L5var = 5; } __attribute__((constructor)) static void Lconstructor()

[Bug ld/22677] New: ld -r --gc-collect does not KEEP .init_array/.fini_array

2018-01-05 Thread d+sourcew...@adaptive-enterprises.com
Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: d+sourcew...@adaptive-enterprises.com Target Milestone: --- "ld -r --gc-collect" drops the .init_array/.fini_array sections, although it preserves .init, .fi