[lld] r210425 - [Mips] Make got16.test test case independent from external input files.

Simon Atanasyan simon at atanasyan.com
Mon Jun 9 01:50:58 PDT 2014


Hmm, that is rather strange because I committed Visibility tag support
a few days ago at r210316
(http://llvm.org/viewvc/llvm-project?rev=210316&view=rev). Did you
update yaml2obj source code?

On Mon, Jun 9, 2014 at 12:31 PM, Rui Ueyama <ruiu at google.com> wrote:
> The test added in this patch contains a YAML directive that cannot be parsed
> by LLD. Did you forget to commit a change for "Visibility"? I'll revert this
> commit to make the build green.
>
> yaml2obj -format=elf /home/ruiu/llvm/tools/lld/test/elf/Mips/got16.test >
> /home/ruiu/build/tools/lld/test/elf/Mips/Output/got16.test.tmp.o
> lld -flavor gnu -target mipsel -shared --noinhibit-exec
> --output-filetype=yaml
> /home/ruiu/build/tools/lld/test/elf/Mips/Output/got16.test.tmp.o      |
> FileCheck -check-prefix YAML
> /home/ruiu/llvm/tools/lld/test/elf/Mips/got16.test
> lld -flavor gnu -target mipsel -shared --noinhibit-exec -o
> /home/ruiu/build/tools/lld/test/elf/Mips/Output/got16.test.tmp2
> /home/ruiu/build/tools/lld/test/elf/Mips/Output/got16.test.tmp.o
> llvm-objdump -t -disassemble
> /home/ruiu/build/tools/lld/test/elf/Mips/Output/got16.test.tmp2 | FileCheck
> -check-prefix RAW /home/ruiu/llvm/tools/lld/test/elf/Mips/got16.test
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> YAML:195:24: error: unknown key 'Visibility'
>       Visibility:      STV_HIDDEN
>                        ^~~~~~~~~~
> yaml2obj: Failed to parse YAML file!
>
>
>
> On Sun, Jun 8, 2014 at 4:33 AM, Simon Atanasyan <simon at atanasyan.com> wrote:
>>
>> Author: atanasyan
>> Date: Sun Jun  8 06:33:05 2014
>> New Revision: 210425
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=210425&view=rev
>> Log:
>> [Mips] Make got16.test test case independent from external input files.
>>
>> Removed:
>>     lld/trunk/test/elf/Mips/Inputs/got16.o
>> Modified:
>>     lld/trunk/test/elf/Mips/got16.test
>>
>> Removed: lld/trunk/test/elf/Mips/Inputs/got16.o
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/Inputs/got16.o?rev=210424&view=auto
>>
>> ==============================================================================
>> Binary files lld/trunk/test/elf/Mips/Inputs/got16.o (original) and
>> lld/trunk/test/elf/Mips/Inputs/got16.o (removed) differ
>>
>> Modified: lld/trunk/test/elf/Mips/got16.test
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/got16.test?rev=210425&r1=210424&r2=210425&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf/Mips/got16.test (original)
>> +++ lld/trunk/test/elf/Mips/got16.test Sun Jun  8 06:33:05 2014
>> @@ -1,11 +1,11 @@
>>  # REQUIRES: mips
>>
>>  # Check handling of global/local GOT16 relocations.
>> +# RUN: yaml2obj -format=elf %s > %t.o
>>  # RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
>> -# RUN:     --output-filetype=yaml %S/Inputs/got16.o \
>> +# RUN:     --output-filetype=yaml %t.o \
>>  # RUN:     | FileCheck -check-prefix YAML %s
>> -# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2 \
>> -# RUN: %S/Inputs/got16.o
>> +# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2
>> %t.o
>>  # RUN: llvm-objdump -t -disassemble %t2 | FileCheck -check-prefix RAW %s
>>
>>  # Local GOT entries:
>> @@ -119,3 +119,78 @@
>>  # RAW: 00012200 l     .data  00000005 str2
>>  # RAW: 0000012c g   F .text  0000001c glob
>>  # RAW: 00012205 g     .data  00000004 hidden
>> +
>> +---
>> +FileHeader:
>> +  Class:           ELFCLASS32
>> +  Data:            ELFDATA2LSB
>> +  Type:            ET_REL
>> +  Machine:         EM_MIPS
>> +  Flags:           [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
>> +
>> +Sections:
>> +  - Name:            .text
>> +    Type:            SHT_PROGBITS
>> +    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
>> +    AddressAlign:    0x04
>> +    Content:
>> '0000848F000084240100848F000284240000848F0000848F0000848F'
>> +  - Name:            .rel.text
>> +    Type:            SHT_REL
>> +    Link:            .symtab
>> +    AddressAlign:    0x04
>> +    Info:            .text
>> +    Relocations:
>> +      - Offset:          0x00
>> +        Symbol:          .data
>> +        Type:            R_MIPS_GOT16
>> +      - Offset:          0x04
>> +        Symbol:          .data
>> +        Type:            R_MIPS_LO16
>> +      - Offset:          0x08
>> +        Symbol:          .data
>> +        Type:            R_MIPS_GOT16
>> +      - Offset:          0x0C
>> +        Symbol:          .data
>> +        Type:            R_MIPS_LO16
>> +      - Offset:          0x10
>> +        Symbol:          hidden
>> +        Type:            R_MIPS_GOT16
>> +      - Offset:          0x14
>> +        Symbol:          glob
>> +        Type:            R_MIPS_CALL16
>> +      - Offset:          0x18
>> +        Symbol:          extern
>> +        Type:            R_MIPS_CALL16
>> +  - Name:            .data
>> +    Type:            SHT_PROGBITS
>> +    Flags:           [ SHF_WRITE, SHF_ALLOC ]
>> +    AddressAlign:    0x04
>> +    Size:            0x10209
>> +
>> +Symbols:
>> +  Local:
>> +    - Name:            str1
>> +      Type:            STT_OBJECT
>> +      Section:         .data
>> +      Size:            0x10200
>> +    - Name:            str2
>> +      Type:            STT_OBJECT
>> +      Section:         .data
>> +      Value:           0x10200
>> +      Size:            0x05
>> +    - Name:            .text
>> +      Type:            STT_SECTION
>> +      Section:         .text
>> +    - Name:            .data
>> +      Type:            STT_SECTION
>> +      Section:         .data
>> +  Global:
>> +    - Name:            glob
>> +      Section:         .text
>> +    - Name:            hidden
>> +      Type:            STT_OBJECT
>> +      Section:         .data
>> +      Value:           0x10205
>> +      Size:            0x04
>> +      Visibility:      STV_HIDDEN
>> +    - Name:            extern
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>



-- 
Simon Atanasyan



More information about the llvm-commits mailing list