Re: Problem with g++-4.0
Justin Pryzby wrote:
> On Tue, Nov 01, 2005 at 03:21:27PM -0500, Nathanael Nerode wrote:
>> Jose Carlos do Nascimento wrote:
>> > Hi, Justin,
>> >
>> > I tested with g++ 3.4 but I get error :(
>> >
>> > look.
>> >
>> > /usr/bin/g++-3.4 -fno-exceptions -I/usr/include/SDL -D_REENTRANT -g -O2
>> > `.gnu.linkonce.t._Z14CPUWriteMemoryjj' referenced in section `.rodata'
>> > of GBA.o: defined in discarded section
>> >
>> > I compiled with gcc3.0 and all works ok.
>> >
>> > I will open bug against gcc4 and gcc3.4.
>>
>> This looks much more likely to be a linker (package "binutils") bug.
> Why do you say that? I was going to send an email that said the same
> thing, but couldn't justify it, so stopped halfway through.
The error message is coming from the linker (it's complaining about
something in a .o file, whereas the compiler would complain about something
in a source file). The error message complains that something is defined
in a "discarded section". The linker is what discards sections. So, I
figure it's more likely to be a linker bug where it's discarding a section
it shouldn't.
Of course, it's possible that the compiler has mistakenly constructed a
section which the linker is within its rights to discard. But the linker
seems like the place to start under these circumstances.
--
ksig --random|
Reply to: