Add testcases for PR ld/11817.
2010-07-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/11817 * ld-i386/compressed1.s: New. * ld-i386/compressed1.d: Likewise. * ld-x86-64/compressed1.s: Likewise. * ld-x86-64/compressed1.d: Likewise. * ld-i386/i386.exp: Run compressed1. * ld-x86-64/x86-64.exp: Likewise.
This commit is contained in:
parent
dfc6c7b266
commit
25d17eb4cc
|
@ -1,3 +1,14 @@
|
|||
2010-07-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/11817
|
||||
* ld-i386/compressed1.s: New.
|
||||
* ld-i386/compressed1.d: Likewise.
|
||||
* ld-x86-64/compressed1.s: Likewise.
|
||||
* ld-x86-64/compressed1.d: Likewise.
|
||||
|
||||
* ld-i386/i386.exp: Run compressed1.
|
||||
* ld-x86-64/x86-64.exp: Likewise.
|
||||
|
||||
2010-07-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/11812
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#name: undefined symbol with compressed debug sections
|
||||
#as: --32
|
||||
#ld: -e foo -melf_i386 --noinhibit-exec
|
||||
#warning: .*/compressed1.c:13: undefined reference to .bar.
|
||||
#nm: -n
|
||||
|
||||
#...
|
||||
[ \t]+U bar
|
||||
#pass
|
|
@ -0,0 +1,186 @@
|
|||
.file "compressed1.c"
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.Ldebug_abbrev0:
|
||||
.section .debug_info,"",@progbits
|
||||
.Ldebug_info0:
|
||||
.section .debug_line,"",@progbits
|
||||
.Ldebug_line0:
|
||||
.text
|
||||
.Ltext0:
|
||||
.cfi_sections .debug_frame
|
||||
.p2align 4,,15
|
||||
.globl foo
|
||||
.type foo, @function
|
||||
foo:
|
||||
.LFB0:
|
||||
.file 1 "compressed1.c"
|
||||
.loc 1 12 0
|
||||
.cfi_startproc
|
||||
pushl %ebp
|
||||
.cfi_def_cfa_offset 8
|
||||
movl %esp, %ebp
|
||||
.cfi_offset 5, -8
|
||||
.cfi_def_cfa_register 5
|
||||
subl $8, %esp
|
||||
.loc 1 14 0
|
||||
leave
|
||||
.cfi_restore 5
|
||||
.cfi_def_cfa 4, 4
|
||||
.loc 1 13 0
|
||||
jmp bar
|
||||
.cfi_endproc
|
||||
.LFE0:
|
||||
.size foo, .-foo
|
||||
.Letext0:
|
||||
.section .debug_info
|
||||
.long 0x5e
|
||||
.value 0x3
|
||||
.long .Ldebug_abbrev0
|
||||
.byte 0x4
|
||||
.uleb128 0x1
|
||||
.long .LASF5
|
||||
.byte 0x1
|
||||
.long .LASF6
|
||||
.long .LASF7
|
||||
.long .Ltext0
|
||||
.long .Letext0
|
||||
.long .Ldebug_line0
|
||||
.uleb128 0x2
|
||||
.byte 0x1
|
||||
.byte 0x6
|
||||
.long .LASF0
|
||||
.uleb128 0x2
|
||||
.byte 0x2
|
||||
.byte 0x5
|
||||
.long .LASF1
|
||||
.uleb128 0x3
|
||||
.byte 0x4
|
||||
.byte 0x5
|
||||
.string "int"
|
||||
.uleb128 0x2
|
||||
.byte 0x4
|
||||
.byte 0x5
|
||||
.long .LASF2
|
||||
.uleb128 0x2
|
||||
.byte 0x1
|
||||
.byte 0x8
|
||||
.long .LASF3
|
||||
.uleb128 0x2
|
||||
.byte 0x2
|
||||
.byte 0x7
|
||||
.long .LASF4
|
||||
.uleb128 0x4
|
||||
.byte 0x1
|
||||
.string "foo"
|
||||
.byte 0x1
|
||||
.byte 0xb
|
||||
.long .LFB0
|
||||
.long .LFE0
|
||||
.byte 0x1
|
||||
.byte 0x9c
|
||||
.byte 0x0
|
||||
.section .debug_abbrev
|
||||
.uleb128 0x1
|
||||
.uleb128 0x11
|
||||
.byte 0x1
|
||||
.uleb128 0x25
|
||||
.uleb128 0xe
|
||||
.uleb128 0x13
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0xe
|
||||
.uleb128 0x1b
|
||||
.uleb128 0xe
|
||||
.uleb128 0x11
|
||||
.uleb128 0x1
|
||||
.uleb128 0x12
|
||||
.uleb128 0x1
|
||||
.uleb128 0x10
|
||||
.uleb128 0x6
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x2
|
||||
.uleb128 0x24
|
||||
.byte 0x0
|
||||
.uleb128 0xb
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3e
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0xe
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x3
|
||||
.uleb128 0x24
|
||||
.byte 0x0
|
||||
.uleb128 0xb
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3e
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0x8
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x4
|
||||
.uleb128 0x2e
|
||||
.byte 0x0
|
||||
.uleb128 0x3f
|
||||
.uleb128 0xc
|
||||
.uleb128 0x3
|
||||
.uleb128 0x8
|
||||
.uleb128 0x3a
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3b
|
||||
.uleb128 0xb
|
||||
.uleb128 0x11
|
||||
.uleb128 0x1
|
||||
.uleb128 0x12
|
||||
.uleb128 0x1
|
||||
.uleb128 0x40
|
||||
.uleb128 0xa
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.section .debug_pubnames,"",@progbits
|
||||
.long 0x16
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.long 0x62
|
||||
.long 0x4f
|
||||
.string "foo"
|
||||
.long 0x0
|
||||
.section .debug_pubtypes,"",@progbits
|
||||
.long 0xe
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.long 0x62
|
||||
.long 0x0
|
||||
.section .debug_aranges,"",@progbits
|
||||
.long 0x1c
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.byte 0x4
|
||||
.byte 0x0
|
||||
.value 0x0
|
||||
.value 0x0
|
||||
.long .Ltext0
|
||||
.long .Letext0-.Ltext0
|
||||
.long 0x0
|
||||
.long 0x0
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.LASF0:
|
||||
.string "signed char"
|
||||
.LASF1:
|
||||
.string "short int"
|
||||
.LASF6:
|
||||
.string "compressed1.c"
|
||||
.LASF5:
|
||||
.string "GNU C 4.4.4 20100630 (Red Hat 4.4.4-10)"
|
||||
.LASF7:
|
||||
.string "."
|
||||
.LASF3:
|
||||
.string "unsigned char"
|
||||
.LASF2:
|
||||
.string "long int"
|
||||
.LASF4:
|
||||
.string "short unsigned int"
|
|
@ -190,3 +190,10 @@ run_dump_test "protected2"
|
|||
run_dump_test "protected3"
|
||||
run_dump_test "tlspie1"
|
||||
run_dump_test "nogot1"
|
||||
|
||||
if { !([istarget "i?86-*-linux*"]
|
||||
|| [istarget "x86_64-*-linux*"]) } {
|
||||
return
|
||||
}
|
||||
|
||||
run_dump_test "compressed1"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#name: undefined symbol with compressed debug sections
|
||||
#as: --64
|
||||
#ld: -e foo -melf_x86_64 --noinhibit-exec
|
||||
#warning: .*/compressed1.c:13: undefined reference to .bar.
|
||||
#nm: -n
|
||||
|
||||
#...
|
||||
[ \t]+U bar
|
||||
#pass
|
|
@ -0,0 +1,176 @@
|
|||
.file "compressed1.c"
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.Ldebug_abbrev0:
|
||||
.section .debug_info,"",@progbits
|
||||
.Ldebug_info0:
|
||||
.section .debug_line,"",@progbits
|
||||
.Ldebug_line0:
|
||||
.text
|
||||
.Ltext0:
|
||||
.cfi_sections .debug_frame
|
||||
.p2align 4,,15
|
||||
.globl foo
|
||||
.type foo, @function
|
||||
foo:
|
||||
.LFB0:
|
||||
.file 1 "compressed1.c"
|
||||
.loc 1 12 0
|
||||
.cfi_startproc
|
||||
.loc 1 13 0
|
||||
jmp bar
|
||||
.cfi_endproc
|
||||
.LFE0:
|
||||
.size foo, .-foo
|
||||
.Letext0:
|
||||
.section .debug_info
|
||||
.long 0x6e
|
||||
.value 0x3
|
||||
.long .Ldebug_abbrev0
|
||||
.byte 0x8
|
||||
.uleb128 0x1
|
||||
.long .LASF5
|
||||
.byte 0x1
|
||||
.long .LASF6
|
||||
.long .LASF7
|
||||
.quad .Ltext0
|
||||
.quad .Letext0
|
||||
.long .Ldebug_line0
|
||||
.uleb128 0x2
|
||||
.byte 0x1
|
||||
.byte 0x6
|
||||
.long .LASF0
|
||||
.uleb128 0x2
|
||||
.byte 0x2
|
||||
.byte 0x5
|
||||
.long .LASF1
|
||||
.uleb128 0x3
|
||||
.byte 0x4
|
||||
.byte 0x5
|
||||
.string "int"
|
||||
.uleb128 0x2
|
||||
.byte 0x8
|
||||
.byte 0x5
|
||||
.long .LASF2
|
||||
.uleb128 0x2
|
||||
.byte 0x1
|
||||
.byte 0x8
|
||||
.long .LASF3
|
||||
.uleb128 0x2
|
||||
.byte 0x2
|
||||
.byte 0x7
|
||||
.long .LASF4
|
||||
.uleb128 0x4
|
||||
.byte 0x1
|
||||
.string "foo"
|
||||
.byte 0x1
|
||||
.byte 0xb
|
||||
.quad .LFB0
|
||||
.quad .LFE0
|
||||
.byte 0x1
|
||||
.byte 0x9c
|
||||
.byte 0x0
|
||||
.section .debug_abbrev
|
||||
.uleb128 0x1
|
||||
.uleb128 0x11
|
||||
.byte 0x1
|
||||
.uleb128 0x25
|
||||
.uleb128 0xe
|
||||
.uleb128 0x13
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0xe
|
||||
.uleb128 0x1b
|
||||
.uleb128 0xe
|
||||
.uleb128 0x11
|
||||
.uleb128 0x1
|
||||
.uleb128 0x12
|
||||
.uleb128 0x1
|
||||
.uleb128 0x10
|
||||
.uleb128 0x6
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x2
|
||||
.uleb128 0x24
|
||||
.byte 0x0
|
||||
.uleb128 0xb
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3e
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0xe
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x3
|
||||
.uleb128 0x24
|
||||
.byte 0x0
|
||||
.uleb128 0xb
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3e
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3
|
||||
.uleb128 0x8
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.uleb128 0x4
|
||||
.uleb128 0x2e
|
||||
.byte 0x0
|
||||
.uleb128 0x3f
|
||||
.uleb128 0xc
|
||||
.uleb128 0x3
|
||||
.uleb128 0x8
|
||||
.uleb128 0x3a
|
||||
.uleb128 0xb
|
||||
.uleb128 0x3b
|
||||
.uleb128 0xb
|
||||
.uleb128 0x11
|
||||
.uleb128 0x1
|
||||
.uleb128 0x12
|
||||
.uleb128 0x1
|
||||
.uleb128 0x40
|
||||
.uleb128 0xa
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.byte 0x0
|
||||
.section .debug_pubnames,"",@progbits
|
||||
.long 0x16
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.long 0x72
|
||||
.long 0x57
|
||||
.string "foo"
|
||||
.long 0x0
|
||||
.section .debug_pubtypes,"",@progbits
|
||||
.long 0xe
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.long 0x72
|
||||
.long 0x0
|
||||
.section .debug_aranges,"",@progbits
|
||||
.long 0x2c
|
||||
.value 0x2
|
||||
.long .Ldebug_info0
|
||||
.byte 0x8
|
||||
.byte 0x0
|
||||
.value 0x0
|
||||
.value 0x0
|
||||
.quad .Ltext0
|
||||
.quad .Letext0-.Ltext0
|
||||
.quad 0x0
|
||||
.quad 0x0
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.LASF0:
|
||||
.string "signed char"
|
||||
.LASF1:
|
||||
.string "short int"
|
||||
.LASF6:
|
||||
.string "compressed1.c"
|
||||
.LASF5:
|
||||
.string "GNU C 4.4.4"
|
||||
.LASF7:
|
||||
.string "."
|
||||
.LASF3:
|
||||
.string "unsigned char"
|
||||
.LASF2:
|
||||
.string "long int"
|
||||
.LASF4:
|
||||
.string "short unsigned int"
|
|
@ -99,3 +99,9 @@ run_dump_test "tlsle1"
|
|||
run_dump_test "tlspie1"
|
||||
run_dump_test "unique1"
|
||||
run_dump_test "nogot1"
|
||||
|
||||
if { ![istarget "x86_64-*-linux*"] } {
|
||||
return
|
||||
}
|
||||
|
||||
run_dump_test "compressed1"
|
||||
|
|
Loading…
Reference in New Issue