This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/23912] New: Go binaries do not call __libc_start_main
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 23 Nov 2018 09:44:03 +0000
- Subject: [Bug libc/23912] New: Go binaries do not call __libc_start_main
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=23912
Bug ID: 23912
Summary: Go binaries do not call __libc_start_main
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
At least on x86-64, the Go linker is broken and does not link against crt1.o.
Instead, the executable entry point looks like this:
0000000000459ad0 <_rt0_amd64_linux>:
459ad0: lea 0x8(%rsp),%rsi
459ad5: mov (%rsp),%rdi
459ad9: lea 0x10(%rip),%rax # 459af0 <main>
459ae0: jmpq *%rax
And:
0000000000459af0 <main>:
459af0: lea -0x3dd7(%rip),%rax # 455d20 <runtime.rt0_go>
459af7: jmpq *%rax
So the proper libc.so.6 initialization sequence is never used.
As a result, various glibc functionality will not work correctly. We probably
need to take this into account when making future changes to __libc_start_main,
so that those broken Go binaries keep working.
--
You are receiving this mail because:
You are on the CC list for the bug.