From: Reiner Herrmann <reiner@reiner-h.de>
To: musl@lists.openwall.com
Subject: Re: Segmentation fault in static binaries built with recent binutils
Date: Wed, 18 Jul 2018 20:14:38 +0200 [thread overview]
Message-ID: <20180718181438.nl4e333zkzw36rzl@reiner-h.de> (raw)
In-Reply-To: <20180718163940.gnx6jkia4i5qdjua@reiner-h.de>
[-- Attachment #1.1: Type: text/plain, Size: 86 bytes --]
> Can you attach a readelf -a of the binary that's crashing?
The output is attached.
[-- Attachment #1.2: readelf.txt --]
[-- Type: text/plain, Size: 11902 bytes --]
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x40102d
Start of program headers: 64 (bytes into file)
Start of section headers: 28880 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 5
Size of section headers: 64 (bytes)
Number of section headers: 23
Section header string table index: 22
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .init PROGBITS 0000000000401000 00001000
0000000000000003 0000000000000000 AX 0 0 1
[ 2] .text PROGBITS 0000000000401010 00001010
0000000000000719 0000000000000000 AX 0 0 16
[ 3] .fini PROGBITS 0000000000401729 00001729
0000000000000003 0000000000000000 AX 0 0 1
[ 4] .rodata PROGBITS 0000000000402000 00002000
000000000000000a 0000000000000001 AMS 0 0 1
[ 5] .eh_frame PROGBITS 0000000000402010 00002010
000000000000003c 0000000000000000 A 0 0 8
[ 6] .init_array INIT_ARRAY 0000000000403ff0 00002ff0
0000000000000008 0000000000000008 WA 0 0 8
[ 7] .fini_array FINI_ARRAY 0000000000403ff8 00002ff8
0000000000000008 0000000000000008 WA 0 0 8
[ 8] .data PROGBITS 0000000000404000 00003000
0000000000000008 0000000000000000 WA 0 0 8
[ 9] .bss NOBITS 0000000000404020 00003008
0000000000000278 0000000000000000 WA 0 0 32
[10] .comment PROGBITS 0000000000000000 00003008
000000000000001d 0000000000000001 MS 0 0 1
[11] .debug_aranges PROGBITS 0000000000000000 00003030
00000000000000e0 0000000000000000 0 0 16
[12] .debug_info PROGBITS 0000000000000000 00003110
0000000000000159 0000000000000000 0 0 1
[13] .debug_abbrev PROGBITS 0000000000000000 00003269
00000000000000f1 0000000000000000 0 0 1
[14] .debug_line PROGBITS 0000000000000000 0000335a
0000000000000126 0000000000000000 0 0 1
[15] .debug_frame PROGBITS 0000000000000000 00003480
0000000000000038 0000000000000000 0 0 8
[16] .debug_str PROGBITS 0000000000000000 000034b8
000000000000272a 0000000000000001 MS 0 0 1
[17] .debug_loc PROGBITS 0000000000000000 00005be2
00000000000000d6 0000000000000000 0 0 1
[18] .debug_ranges PROGBITS 0000000000000000 00005cc0
00000000000000a0 0000000000000000 0 0 16
[19] .debug_macro PROGBITS 0000000000000000 00005d60
00000000000007fb 0000000000000000 0 0 1
[20] .symtab SYMTAB 0000000000000000 00006560
00000000000007e0 0000000000000018 21 48 8
[21] .strtab STRTAB 0000000000000000 00006d40
00000000000002b2 0000000000000000 0 0 1
[22] .shstrtab STRTAB 0000000000000000 00006ff2
00000000000000de 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
l (large), p (processor specific)
There are no section groups in this file.
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000001000 0x0000000000401000 0x0000000000401000
0x000000000000072c 0x000000000000072c R E 0x1000
LOAD 0x0000000000002000 0x0000000000402000 0x0000000000402000
0x000000000000004c 0x000000000000004c R 0x1000
LOAD 0x0000000000002ff0 0x0000000000403ff0 0x0000000000403ff0
0x0000000000000018 0x00000000000002a8 RW 0x1000
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x10
GNU_RELRO 0x0000000000002ff0 0x0000000000403ff0 0x0000000000403ff0
0x0000000000000010 0x0000000000000010 R 0x1
Section to Segment mapping:
Segment Sections...
00 .init .text .fini
01 .rodata .eh_frame
02 .init_array .fini_array .data .bss
03
04 .init_array .fini_array
There is no dynamic section in this file.
There are no relocations in this file.
The decoding of unwind sections for machine type Advanced Micro Devices X86-64 is not currently supported.
Symbol table '.symtab' contains 84 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000401000 0 SECTION LOCAL DEFAULT 1
2: 0000000000401010 0 SECTION LOCAL DEFAULT 2
3: 0000000000401729 0 SECTION LOCAL DEFAULT 3
4: 0000000000402000 0 SECTION LOCAL DEFAULT 4
5: 0000000000402010 0 SECTION LOCAL DEFAULT 5
6: 0000000000403ff0 0 SECTION LOCAL DEFAULT 6
7: 0000000000403ff8 0 SECTION LOCAL DEFAULT 7
8: 0000000000404000 0 SECTION LOCAL DEFAULT 8
9: 0000000000404020 0 SECTION LOCAL DEFAULT 9
10: 0000000000000000 0 SECTION LOCAL DEFAULT 10
11: 0000000000000000 0 SECTION LOCAL DEFAULT 11
12: 0000000000000000 0 SECTION LOCAL DEFAULT 12
13: 0000000000000000 0 SECTION LOCAL DEFAULT 13
14: 0000000000000000 0 SECTION LOCAL DEFAULT 14
15: 0000000000000000 0 SECTION LOCAL DEFAULT 15
16: 0000000000000000 0 SECTION LOCAL DEFAULT 16
17: 0000000000000000 0 SECTION LOCAL DEFAULT 17
18: 0000000000000000 0 SECTION LOCAL DEFAULT 18
19: 0000000000000000 0 SECTION LOCAL DEFAULT 19
20: 0000000000000000 0 FILE LOCAL DEFAULT ABS exit.lo
21: 0000000000401410 2 FUNC LOCAL DEFAULT 2 dummy
22: 0000000000401420 58 FUNC LOCAL DEFAULT 2 libc_exit_fini
23: 0000000000000000 0 FILE LOCAL DEFAULT ABS crt1.c
24: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
25: 0000000000401080 0 FUNC LOCAL DEFAULT 2 deregister_tm_clones
26: 00000000004010b0 0 FUNC LOCAL DEFAULT 2 register_tm_clones
27: 00000000004010f0 0 FUNC LOCAL DEFAULT 2 __do_global_dtors_aux
28: 0000000000404020 1 OBJECT LOCAL DEFAULT 9 completed.7090
29: 0000000000403ff8 0 OBJECT LOCAL DEFAULT 7 __do_global_dtors_aux_fin
30: 0000000000401120 0 FUNC LOCAL DEFAULT 2 frame_dummy
31: 0000000000403ff0 0 OBJECT LOCAL DEFAULT 6 __frame_dummy_init_array_
32: 0000000000000000 0 FILE LOCAL DEFAULT ABS test.c
33: 0000000000000000 0 FILE LOCAL DEFAULT ABS __libc_start_main.lo
34: 0000000000401140 2 FUNC LOCAL DEFAULT 2 dummy
35: 0000000000401150 2 FUNC LOCAL DEFAULT 2 dummy1
36: 0000000000401390 50 FUNC LOCAL DEFAULT 2 libc_start_init
37: 0000000000000000 0 FILE LOCAL DEFAULT ABS __init_tls.lo
38: 0000000000401550 378 FUNC LOCAL DEFAULT 2 static_init_tls
39: 0000000000404040 48 OBJECT LOCAL DEFAULT 9 main_tls
40: 0000000000404080 376 OBJECT LOCAL DEFAULT 9 builtin_tls
41: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
42: 0000000000402048 0 OBJECT LOCAL DEFAULT 5 __FRAME_END__
43: 0000000000000000 0 FILE LOCAL DEFAULT ABS
44: 0000000000404000 0 NOTYPE LOCAL DEFAULT 7 __fini_array_end
45: 0000000000403ff8 0 NOTYPE LOCAL DEFAULT 7 __fini_array_start
46: 0000000000403ff8 0 NOTYPE LOCAL DEFAULT 6 __init_array_end
47: 0000000000403ff0 0 NOTYPE LOCAL DEFAULT 6 __init_array_start
48: 0000000000401160 545 FUNC GLOBAL DEFAULT 2 __init_libc
49: 0000000000404200 8 OBJECT GLOBAL HIDDEN 9 __hwcap
50: 00000000004016e7 0 FUNC GLOBAL DEFAULT 2 memcpy
51: 0000000000404008 0 OBJECT GLOBAL HIDDEN 8 __TMC_END__
52: 0000000000404220 112 OBJECT GLOBAL HIDDEN 9 __libc
53: 0000000000404000 0 OBJECT GLOBAL HIDDEN 8 __dso_handle
54: 0000000000401719 0 FUNC GLOBAL DEFAULT 2 __set_thread_area
55: 00000000004014c0 138 FUNC GLOBAL DEFAULT 2 __copy_tls
56: 0000000000404038 8 OBJECT WEAK DEFAULT 9 _environ
57: 0000000000404038 8 OBJECT GLOBAL DEFAULT 9 __environ
58: 00000000004016d0 23 FUNC GLOBAL DEFAULT 2 _Exit
59: 0000000000401550 378 FUNC WEAK DEFAULT 2 __init_tls
60: 0000000000401000 0 NOTYPE GLOBAL DEFAULT 1 _init
61: 0000000000401410 2 FUNC WEAK DEFAULT 2 __funcs_on_exit
62: 00000000004016e7 0 NOTYPE GLOBAL HIDDEN 2 __memcpy_fwd
63: 0000000000404038 8 OBJECT WEAK DEFAULT 9 environ
64: 0000000000404038 8 OBJECT WEAK DEFAULT 9 ___environ
65: 0000000000404030 8 OBJECT GLOBAL DEFAULT 9 __progname
66: 000000000040102d 0 NOTYPE GLOBAL DEFAULT 2 _start
67: 0000000000401050 40 FUNC GLOBAL DEFAULT 2 _start_c
68: 0000000000404030 8 OBJECT WEAK DEFAULT 9 program_invocation_short_
69: 0000000000401390 50 FUNC WEAK DEFAULT 2 __libc_start_init
70: 0000000000401460 95 FUNC GLOBAL DEFAULT 2 __init_tp
71: 0000000000401150 2 FUNC WEAK DEFAULT 2 __init_ssp
72: 0000000000404008 0 NOTYPE GLOBAL DEFAULT 9 __bss_start
73: 0000000000401127 11 FUNC GLOBAL DEFAULT 2 main
74: 0000000000401410 2 FUNC WEAK DEFAULT 2 __stdio_exit
75: 0000000000401729 0 NOTYPE GLOBAL DEFAULT 3 _fini
76: 0000000000401420 58 FUNC WEAK DEFAULT 2 __libc_exit_fini
77: 0000000000404008 0 NOTYPE GLOBAL DEFAULT 8 _edata
78: 0000000000404298 0 NOTYPE GLOBAL DEFAULT 9 _end
79: 0000000000401010 29 FUNC GLOBAL DEFAULT 2 exit
80: 00000000004013d0 61 FUNC GLOBAL DEFAULT 2 __libc_start_main
81: 0000000000404028 8 OBJECT WEAK DEFAULT 9 program_invocation_name
82: 0000000000404290 8 OBJECT GLOBAL HIDDEN 9 __sysinfo
83: 0000000000404028 8 OBJECT GLOBAL DEFAULT 9 __progname_full
No version information found in this file.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-07-18 18:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 16:39 Reiner Herrmann
2018-07-18 17:37 ` Rich Felker
2018-07-18 18:14 ` Reiner Herrmann [this message]
2018-07-18 19:00 ` Szabolcs Nagy
2018-07-18 19:38 ` Szabolcs Nagy
2018-07-18 20:19 ` Szabolcs Nagy
2018-07-18 20:24 ` Szabolcs Nagy
2018-07-18 20:50 ` Rich Felker
2018-07-18 20:53 ` Reiner Herrmann
2018-07-18 21:37 ` Szabolcs Nagy
2018-07-18 21:49 ` Reiner Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180718181438.nl4e333zkzw36rzl@reiner-h.de \
--to=reiner@reiner-h.de \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).