-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stripped 8.out crashes #261
Labels
Comments
Changed since recent changes, but still fails (same on i386, but this is an issue on amd64 too): > strip -d 6.out BFD: 6.out: warning: Empty loadable segment detected, is this intentional ? BFD: stE2SbKS: warning: allocated section `.interp' not in segment > ./6.out ELF interpreter ^?ELF^B^A^A not found Abort Does this happen on Linux? |
This is a known issue. If you strip the binary you throw away the runtime symbol information that gets used for stack traces and some aspects of reflection. Don't do that. ;-) We plan to move that data into a rodata segment and then strip will not break the binary but will also not remove very much. Status changed to LongTerm. |
Where do the runtime symbols get stored? Everywhere that I'm seeing right now implies that they're either in .hash or .gosymtab which would suggest that if those sections are read-only, they shouldn't get tossed by strip. But they are: > objdump -hrt ../gofmt/gofmt ../gofmt/gofmt: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 00000015 00000000004007eb 00000000004007eb 000007eb 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .got 00000000 0000000000446678 0000000000446678 00046678 2**3 CONTENTS, ALLOC, LOAD, DATA 2 .got.plt 00000000 0000000000446d48 0000000000446d48 00046d48 2**3 CONTENTS, ALLOC, LOAD, DATA 3 .dynsym 00000018 0000000000464a28 0000000000464a28 00064a28 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynstr 00000004 0000000000446470 0000000000446470 00046470 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .hash 00000010 0000000000492ae0 0000000000492ae0 00092ae0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .rela 00000000 00000000004472d8 00000000004472d8 000472d8 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .dynamic 00000090 0000000000482e48 0000000000482e48 00082e48 2**3 CONTENTS, ALLOC, LOAD, DATA 8 .text 00044f26 0000000000400800 0000000000400800 00000800 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 9 .data 00060748 0000000000446000 0000000000446000 00046000 2**3 CONTENTS, ALLOC, LOAD, DATA 10 .bss 002145d0 00000000004a6748 00000000004a6748 000a6748 2**3 ALLOC 11 .gosymtab 0007664f 0000000000000000 0000000000000000 000a7008 2**0 CONTENTS, READONLY 12 .gopclntab 000057e6 0000000000000000 0000000000000000 0011d657 2**0 CONTENTS, READONLY SYMBOL TABLE: no symbols |
This issue was closed by revision 000ab98. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by wjosephson:
The text was updated successfully, but these errors were encountered: