https://sourceware.org/bugzilla/show_bug.cgi?id=27869
--- Comment #2 from web_hero <chen.yunxing at me dot com> --- (In reply to Cary Coutant from comment #1) > Based on that stack trace, you appear to be linking an output file that has > more than 64K sections in it. Obviously, gold should not be crashing when > that happens, but what on earth are you linking that has so many output > sections? That just shouldn't happen in any practical application. Solving > that may work around this bug. > > Please add "-v -Wl,--debug=plugin" options, and send me the verbose gcc > output and a tar file of the resulting debug directory. I use -ffunction-sections maybe this cause too many sections? this opt option was used to reorder function in link stage It seems relative to my custom ld script: -Wl,-znorelro -Wl,-T,${CMAKE_SOURCE_DIR}/rpm/ld.lds When I remove : -Wl,-T,${CMAKE_SOURCE_DIR}/rpm/ld.lds It success. The link script’s content is: SECTIONS { memory_context_static_id : { KEEP(*(SORT(memory_context_static_id*))); } co_buffer : { KEEP(*(*CO_BUFFER_BEGIN*)) KEEP(*(*COBUFFER*)) KEEP(*(*CO_BUFFER_END*)) } co_hook : { KEEP(*(*CO_HOOK_BEGIN*)) KEEP(*(*COHOOK*)) KEEP(*(*CO_HOOK_END*)) } } is it caused by incorrect usage of ld script for gold ? If so, how can I use this script correctly for gold. -- You are receiving this mail because: You are on the CC list for the bug.