]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/testsuite/binutils-all/dwo.s
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / dwo.s
1 /* Assembler source used to create an object file for testing readelf's
2 and objdump's ability to process separate dwarf object files.
3
4 Copyright (C) 2017-2018 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 .debug_str section for local use. This is also to check
21 the ability to dump the same section twice, if it exists in
22 both the main file and the separate debug info file. */
23
24 .section .debug_str,"MS",%progbits,1
25 string1:
26 .asciz "debugfile.dwo"
27 string2:
28 .asciz "/path/to/dwo/files"
29 string3:
30 .asciz "/another/path/"
31 .balign 2
32 string_end:
33
34 /* Create a .debug_info section that contains the dwo links. */
35
36 .section .debug_info,"",%progbits
37 .4byte debugE - debugS ;# Length of Compilation Unit Info
38 debugS:
39 .short 0x4 ;# DWARF version number.
40 .4byte 0x0 ;# Offset into .debug_abbrev section.
41 .byte 0x4 ;# Pointer Size (in bytes).
42
43 .uleb128 0x1 ;# Use abbrev #1. This needs strings from the .debug_str section.
44 .4byte string1
45 .4byte string2
46
47 .uleb128 0x2 ;# Use abbrev #2.
48 .asciz "file.dwo"
49 .4byte string3
50 .8byte 0x12345678aabbccdd
51
52 ;# Minimal section alignment on alpha-* is 2, so ensure no new invalid CU
53 ;# will be started.
54 .balign 2, 0
55 debugE:
56
57 .section .debug_abbrev,"",%progbits
58
59 /* Create an abbrev containing a DWARF5 style dwo link. */
60 .uleb128 0x01 ;# Abbrev code.
61 .uleb128 0x11 ;# DW_TAG_compile_unit
62 .byte 0x00 ;# DW_children_no
63 .uleb128 0x76 ;# DW_AT_dwo_name
64 .uleb128 0x0e ;# DW_FORM_strp
65 .uleb128 0x1b ;# DW_AT_comp_dir
66 .uleb128 0x0e ;# DW_FORM_strp
67 .byte 0x00 ;# End of abbrev
68 .byte 0x00
69
70 /* Create an abbrev containing a GNU style dwo link. */
71 .uleb128 0x02 ;# Abbrev code.
72 .uleb128 0x11 ;# DW_TAG_compile_unit
73 .byte 0x00 ;# DW_children_no
74 .uleb128 0x2130 ;# DW_AT_GNU_dwo_name
75 .uleb128 0x08 ;# DW_FORM_string
76 .uleb128 0x1b ;# DW_AT_comp_dir
77 .uleb128 0x0e ;# DW_FORM_strp
78 .uleb128 0x2131 ;# DW_AT_GNU_dwo_id
79 .uleb128 0x07 ;# DW_FORM_data8
80 .byte 0x00 ;# End of abbrev
81 .byte 0x00
82
83 .byte 0x0 ;# Abbrevs terminator
84