------- Additional Comments From amodra at gmail dot com 2010-01-07 11:23 ------- Imagine someone who wants an array of functions (perhaps constructor like) or some other object used in their app. They set up weak references in a named section, then access the array using the __start_* symbol. The array itself isn't referenced so references there don't cause the functions to be kept.
Oh.. My array won't be kept either. I didn't think of that earlier.. Hmm, the named section would need to be a debug section, and then it doesn't matter if there is a change in the way __start_* affects --gc-sections. So my concern that HJ's idea might affect some existing app is probably not valid. I still don't particularly like a reference to __start_somesection meaning that we should keep all "somesection" input sections. It would be better if there were a more explicit way to mark input sections. I also note that HJ's patch is incorrect since marking a section with gc_mark and returning NULL from gc_mark_hook will result in no mark phase recursion for that section. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11133 ------- 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