diff options
author | Mark Harmstone <mark@harmstone.com> | 2022-12-09 01:52:34 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-12-23 19:57:56 +1030 |
commit | 598c1ae610f7fd6352ed5445ab38f99a21062f21 (patch) | |
tree | 1224187635903a4f2d84e346ea3605dcdb628995 /ld/testsuite | |
parent | 8b182dc3c6e7f763504c0f0e9cf699da36d499dd (diff) | |
download | binutils-598c1ae610f7fd6352ed5445ab38f99a21062f21.zip binutils-598c1ae610f7fd6352ed5445ab38f99a21062f21.tar.gz binutils-598c1ae610f7fd6352ed5445ab38f99a21062f21.tar.bz2 |
ld: Write DEBUG_S_LINES entries in PDB file
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-pe/pdb.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/pdb3-c13-info1.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/pdb3a.s | 88 |
3 files changed, 96 insertions, 2 deletions
diff --git a/ld/testsuite/ld-pe/pdb.exp b/ld/testsuite/ld-pe/pdb.exp index 9dab411..2e5f834 100644 --- a/ld/testsuite/ld-pe/pdb.exp +++ b/ld/testsuite/ld-pe/pdb.exp @@ -870,7 +870,7 @@ proc test4 { } { return } - if ![ld_link $ld "tmpdir/pdb3.exe" "--pdb=tmpdir/pdb3.pdb tmpdir/pdb3a.o tmpdir/pdb3b.o"] { + if ![ld_link $ld "tmpdir/pdb3.exe" "--pdb=tmpdir/pdb3.pdb --gc-sections -e main tmpdir/pdb3a.o tmpdir/pdb3b.o"] { unsupported "Create PE image with PDB file" return } diff --git a/ld/testsuite/ld-pe/pdb3-c13-info1.d b/ld/testsuite/ld-pe/pdb3-c13-info1.d index f92062b..5a4f948 100644 --- a/ld/testsuite/ld-pe/pdb3-c13-info1.d +++ b/ld/testsuite/ld-pe/pdb3-c13-info1.d @@ -5,4 +5,10 @@ Contents of section .data: 0000 f4000000 30000000 02000000 10016745 ....0.........gE 0010 2301efcd ab8998ba dcfe1023 45670000 #..........#Eg.. 0020 06000000 100198ba dcfe1023 45676745 ...........#EggE - 0030 2301efcd ab890000 #.......
\ No newline at end of file + 0030 2301efcd ab890000 f2000000 58000000 #...........X... + 0040 00000000 01000000 14000000 00000000 ................ + 0050 02000000 1c000000 00000000 01000080 ................ + 0060 04000000 02000080 18000000 02000000 ................ + 0070 1c000000 08000000 03000080 0c000000 ................ + 0080 04000080 00000000 01000000 14000000 ................ + 0090 10000000 05000080 ........
\ No newline at end of file diff --git a/ld/testsuite/ld-pe/pdb3a.s b/ld/testsuite/ld-pe/pdb3a.s index 71795b5..1df84a3 100644 --- a/ld/testsuite/ld-pe/pdb3a.s +++ b/ld/testsuite/ld-pe/pdb3a.s @@ -1,4 +1,5 @@ .equ CV_SIGNATURE_C13, 4 +.equ DEBUG_S_LINES, 0xf2 .equ DEBUG_S_STRINGTABLE, 0xf3 .equ DEBUG_S_FILECHKSMS, 0xf4 .equ CHKSUM_TYPE_MD5, 1 @@ -50,3 +51,90 @@ .chksms_end: .balign 4 + +.long DEBUG_S_LINES +.long .lines_end - .lines_start + +.lines_start: + +.secrel32 main +.secidx main +.short 0 # flags +.long .main_end - main # length of region + +.lines_block1: + +.long 0 # file ID 0 (foo) +.long 2 # no. lines +.long .lines_block2 - .lines_block1 # length + +.long .line1 - main +.long 0x80000001 # line 1 +.long .line2 - main +.long 0x80000002 # line 2 + +.lines_block2: + +.long 0x18 # file ID 18 (bar) +.long 2 # no. lines +.long .lines_block3 - .lines_block2 # length + +.long .line3 - main +.long 0x80000003 # line 3 +.long .line4 - main +.long 0x80000004 # line 4 + +.lines_block3: + +.long 0 # file ID 0 (foo) +.long 1 # no. lines +.long .lines_end - .lines_block3 # length + +.long .line5 - main +.long 0x80000005 # line 5 + +.lines_end: + +.long DEBUG_S_LINES +.long .lines_end2 - .lines_start2 + +.lines_start2: + +.secrel32 gcfunc +.secidx gcfunc +.short 0 # flags +.long .gcfunc_end - gcfunc # length of region + +.lines_block4: + +.long 0 # file ID 0 (foo) +.long 1 # no. lines +.long .lines_end2 - .lines_block4 # length + +.long .line6 - gcfunc +.long 0x80000006 # line 6 + +.lines_end2: + +.text + +.global main +main: +.line1: + .long 0x12345678 +.line2: + .long 0x12345678 +.line3: + .long 0x12345678 +.line4: + .long 0x12345678 +.line5: + .long 0x12345678 +.main_end: + +.section "gcsect" + +gcfunc: +.line6: + .long 0x12345678 +.gcfunc_end: |