https://sourceware.org/bugzilla/show_bug.cgi?id=32961
--- Comment #2 from Zhiyuan Lv <zhiyuan.lv at linux dot intel.com> --- Thanks H.J. for the comments! (In reply to H.J. Lu from comment #1) > (In reply to Zhiyuan Lv from comment #0) > > > > If all above is correct, could we consider below two options? > > > > 1. Add a new type of ".pushsection", say, ".pushnewsection", which will > > always create a new section. > > This may work. Or an assembler option to force a new section for > .pushsection. This doesn't require source code changes. Only a new > assembler is needed. Yeah that would be simpler. The only concern is the side effect of always generating new sections for .pushsection with that assembler option. Is it OK? > > > 2. Let LD be able to ignore some given sections while doing the section > > dependency calculation. If a symbol is deleted, simply remove the relocation > > entry in the specified "ignored section". > > Linker can't remove .alt_section since there is only one .alt_section and > it is used by entry_func. Right. What I was thinking is to only remove some items in .rela.alt_section if a symbol to be removed appears in that section. Otherwise I guess linker will report error on that? "2" is a little more complicated than "1". So probably the assembler change is the way to go. Thanks! > > > Either one can address above case of test.c. Any comments? Thanks! -- You are receiving this mail because: You are on the CC list for the bug.