This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC section type conflict (created PR 51623)


On 2011/12/19 äå 03:18, Richard Henderson wrote:
> On 12/17/2011 10:36 PM, Chung-Lin Tang wrote:
>> I don't think it's that kind of problem; the powerpc backend uses
>> unlikely_text_section_p(), which compares the passed in argument section
>> and the value of function_section_1(current_function_decl,true).
> 
> I think this might be the real bug, or something related.
> 
>> Since current_function_decl is NULL at assembly phase, it retrieves
>> ".text.unlikely" to test for equality. It's the retrieving/lookup that
>> fails here, because the default looked-up section flags set when decl ==
>> NULL does not really seem to make sense (adds SECTION_WRITE).
> 
> current_function_decl is only null when we're not inside a function.
> 
> One possible fix is to test for current_function_section inside
> unlikely_text_section_p.  However, I think that begs the question
> of what in the world is actually going on in rs6000_assemble_integer.
> Why are we testing for emitting data in text sections?

I think I sort of mis-represented the context here; this was not really
during the assembly phase of a function, but already in
toplev.c:output_object_blocks().

I've created a bugzilla PR for this, with a testcase from U-boot, and a
minimal testcase: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51623

Thanks,
Chung-Lin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]