This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [GOLD][PATCH] exempt ARM from test initpri3b


Hi

   This is a revised patch.  It just disables the test unconditionally.

-Doug

2012-03-16  Doug Kwan  <dougkwan@google.com>

        * testsuite/Makefile.am: Disable test initpri3b.
        * testsuite/Makefile.in: Regenerate.


On Fri, Mar 16, 2012 at 6:42 AM, Ian Lance Taylor <iant@google.com> wrote:
> "Doug Kwan (éæå)" <dougkwan@google.com> writes:
>
>> Â Â This patch make the test initpri3b a no-op for the ARM target.
>> The test uses the --no-ctors-in-init-array option. ÂThis test cannot
>> pass on ARM target because it does not use .ctors and .dtors sections.
>> ÂThe function Â__do_global_ctors_aux() in crtBegin*.o does not check
>> the constructor on ARM because all constructors should be in the
>> .init_array section.
>>
>> #ifdef INIT_ARRAY_SECTION_ASM_OP
>>
>> /* If we are using .init_array, there is nothing to do. Â*/
>>
>> #elif defined(INIT_SECTION_ASM_OP)
>>
>> #ifdef OBJECT_FORMAT_ELF
>> static void __attribute__((used))
>> __do_global_ctors_aux (void)
>> {
>> Â func_ptr *p;
>> Â for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
>> Â Â (*p) ();
>> }
>>
>> The macro ÂINIT_ARRAY_SECTION_ASM_OP is defined in gcc/config/arm/bpabi.h:
>>
>> /* The BPABI specifies the use of .{init,fini}_array. ÂTherefore, we
>> Â Âdo not want GCC to put anything into the .{init,fini} sections. Â*/
>> #undef INIT_SECTION_ASM_OP
>> #undef FINI_SECTION_ASM_OP
>> #define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
>> #define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
>
>
> Thanks--the truth is we need a better fix here, because even on non-ARM
> platforms gcc may be configured to put all constructors into the
> .init_array section. ÂSo this test really needs a configure test to see
> whether it works at all.
>
> Given that gcc is moving toward using .init_array in all cases I think
> we should probably just comment out the test with a comment explaining
> why. ÂI'll preapprove that patch if you want to write it.
>
> Ian

Attachment: patch.txt
Description: Text document


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