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: [ld, testsuite] Relax the expectation pattern for several plugin-* tests


On Mon, Feb 13, 2017 at 8:03 AM, Jiong Wang <jiong.wang@foss.arm.com> wrote:
>>>> hook called: all symbols read.
>>>> Input: /work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c
>>>> (/work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c)
>>>> Sym: 'func' Resolution: LDPR_PREVAILING_DEF
>>>> Sym: '_func' Resolution: LDPR_PREVAILING_DEF_IRONLY
>>>> /work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/ld-new:
>>>> /work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c (symbol
>>>> from plugin)(func): warning: interworking not enabled.
>>>>   first occurrence:
>>>> /work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/tmpdir/main.o:
>>>> Thumb
>>>> call to ARM
>>>
>>>
>>> I think those failures are caused by those extra messages.
>>> I am not familiar with ARM linker.  I can skip those tests
>>> for ARM.
>>
>>
>> It looks like an ARM linker bug.  ARM linker shouldn't complain
>> anything on input BFDs with BFD_PLUGIN since it is a dummy
>> input file.
>
>
> Or can we simply relax the testcase expectation result a little bit while
> we still keeps those essential outputs that we want to catch?
>
> Is this patch OK for master?
>
> IMHO, keeping the warning might be better than silently accepting it.  As
> the
> dummy input file really doesn't have proper elf header flags.  I am not sure
> if relax the checking on BFD_PLUGIN will cause hiding silent issue once
> there
> is future change on BFD_PLUGIN.
>
> ld/
> 2017-02-10  Jiong Wang  <jiong.wang@arm.com>
>
>         * testsuite/ld-plugin/plugin-15.d: Relax the match pattern.
>         * testsuite/ld-plugin/plugin-16.d: Likewise.
>         * testsuite/ld-plugin/plugin-20.d: Likewise.
>         * testsuite/ld-plugin/plugin-21.d: Likewise.
>         * testsuite/ld-plugin/plugin-22.d: Likewise.
>         * testsuite/ld-plugin/plugin-23.d: Likewise.
>

I agree that ARM linker shouldn't complain IR symbols in this case.
Can you update ARM linker like this?

-- 
H.J.
--
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 8171b0b..c3d99df 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2115,7 +2115,7 @@ typedef unsigned short int insn16;
 #define INTERWORK_FLAG(abfd)  \
   (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) >= EF_ARM_EABI_VER4 \
   || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK) \
-  || ((abfd)->flags & BFD_LINKER_CREATED))
+  || ((abfd)->flags & (BFD_LINKER_CREATED | BFD_PLUGIN)))

 /* The linker script knows the section names for placement.
    The entry_names are used to do simple name mangling on the stubs.


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