http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52999
--- Comment #2 from dave.anglin at bell dot net 2012-04-23 13:47:31 UTC --- On 4/23/2012 5:58 AM, jakub at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52999 > > --- Comment #1 from Jakub Jelinek<jakub at gcc dot gnu.org> 2012-04-23 > 09:58:38 UTC --- > Created attachment 27219 > --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27219 > gcc48-pr52999.patch > > This patch avoids the ICE when diagnosing the section conflict, but not sure > what to do to actually compile the testcase without errors. What ld.so does > is > not exactly kosher from GCC POV (it wants to put non-constant, writable > variables into a section that GCC assumes is for constant variables that need > relocations). I asked a glibc maintainer whether it would be possible to work around the issue. I know from debugging that there is at least one varable in the code that's placed in .data.rel.ro and assigned to. So, the const qualifier can't be used for it. As things stand, glibc doesn't build with GCC 4.6 and later. One fix might be to provide an option to set the SECTION_OVERRIDE flag. Another might be to issue a warning rather than an error on section conflicts. Dave