a3691a03c39a603d21f63d560f25a75ac1aca7a4
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / debuglink.s
1 /* Assembler source used to create an object file for testing readelf's
2 and objdump's ability to process separate debug information files.
3
4 Copyright (C) 2017 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19
20 /* Create a fake .gnu_debuglink section. */
21
22 .section .gnu_debuglink,"",%progbits
23 .asciz "this_is_a_debuglink.debug"
24 .balign 4
25 .4byte 0x12345678
26
27 /* Create a fake .gnu_debugaltlink section. */
28
29 .section .gnu_debugaltlink,"",%progbits
30 .asciz "linkdebug.debug"
31 .dc.b 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
32 .dc.b 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
33 .dc.b 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef
34
35 /* Create a .debug_str section for local use. This is also to check
36 the ability to dump the same section twice, if it exists in
37 both the main file and the separate debug info file. */
38
39 .section .debug_str,"MS",%progbits,1
40 string1:
41 .asciz "string-1"
42 .asciz "string-2"
43 .balign 2
44 string_end:
45
46 /* Create a .debug_info section that contains strings references into the
47 separate debug info file. Plus the abbreviations are stored in the
48 separate file too... */
49
50 .section .debug_info,"",%progbits
51 .4byte debugE - debugS ;# Length of Compilation Unit Info
52 debugS:
53 .short 0x4 ;# DWARF version number.
54 .4byte 0x0 ;# Offset into .debug_abbrev section.
55 .byte 0x4 ;# Pointer Size (in bytes).
56
57 .uleb128 0x1 ;# Use abbrev #1. This needs a string from the local string table.
58 .4byte string1
59
60 .uleb128 0x2 ;# Use abbrev #2. This needs a string from the separate string table.
61 .4byte 0x0 ;# Avoid complicated expression resolution and hard code the offset...
62
63 ;# Minimal section alignment on alpha-* is 2, so ensure no new invalid CU
64 ;# will be started.
65 .balign 2, 0
66 debugE:
67
This page took 0.031987 seconds and 3 git commands to generate.