| 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-2020 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 | /* This is the separate debug info file. */ |
| 20 | |
| 21 | /* Create .note.gnu.build-id note for use by the .gnu_debugaltlink |
| 22 | in the main object file. */ |
| 23 | |
| 24 | .section .note.gnu.build-id,"a",%note |
| 25 | .balign 4 |
| 26 | .dc.l 0x04 ;# Name size |
| 27 | .dc.l 0x18 ;# Description size |
| 28 | .dc.l 0x03 ;# Type |
| 29 | .asciz "GNU" ;# Name |
| 30 | .dc.b 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 |
| 31 | .dc.b 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff |
| 32 | .dc.b 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef |
| 33 | |
| 34 | /* Create a .debug_abbrev section for use by the .debug_info section |
| 35 | in the main object file. */ |
| 36 | |
| 37 | .section .debug_abbrev,"",%progbits |
| 38 | abbrevs: |
| 39 | .uleb128 0x01 ;# Abbrev code. |
| 40 | .uleb128 0x11 ;# DW_TAG_compile_unit |
| 41 | .byte 0x00 ;# DW_children_no |
| 42 | .uleb128 0x03 ;# DW_AT_name |
| 43 | .uleb128 0x0e ;# DW_FORM_strp |
| 44 | .byte 0x00 ;# End of abbrev |
| 45 | .byte 0x00 |
| 46 | |
| 47 | .uleb128 0x02 ;# Abbrev code. |
| 48 | .uleb128 0x2e ;# DW_TAG_subprogram |
| 49 | .byte 0x00 ;# DW_children_no |
| 50 | .uleb128 0x03 ;# DW_AT_name |
| 51 | .uleb128 0x1f21 ;# DW_FORM_GNU_strp_alt |
| 52 | .byte 0x0 ;# End of abbrev |
| 53 | .byte 0x0 |
| 54 | |
| 55 | .byte 0x0 ;# Abbrevs terminator |
| 56 | |
| 57 | /* Create a .debug_str section for remote use. This is also to check |
| 58 | the ability to dump the same section twice, if it exists in |
| 59 | both the main file and the separate debug info file. */ |
| 60 | |
| 61 | .section .debug_str,"MS",%progbits,1 |
| 62 | string3: |
| 63 | .asciz "string-3" |
| 64 | .asciz "string-4" |
| 65 | .balign 2 |
| 66 | string_end: |