This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17601] New: __start function can not reach __libc_start_main in different region
- From: "mips32r2 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 14 Nov 2014 16:22:05 +0000
- Subject: [Bug libc/17601] New: __start function can not reach __libc_start_main in different region
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17601
Bug ID: 17601
Summary: __start function can not reach __libc_start_main in
different region
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: mips32r2 at gmail dot com
CC: drepper.fsp at gmail dot com
Reproduction steps:
Try to compile the following example for mips32:
int main() {
asm(".fill 100000000, 4, 0x00000000\n");
return 0;
}
Current behaviour:
Compiling it will trigger the following error:
../sysdeps/mips/start.S:109:(.text+0x44): relocation truncated to fit:
R_MIPS_26 against `__libc_start_main@@GLIBC_2.0'
collect2: error: ld returned 1 exit status
Expected behaviour:
The program is linked without problems and can be executed.
Additional info:
This is a small and trivial example, but the real world application - and that
is Chromium browser_tests will fail to link due to the very same issue.
As reported by ld, the root cause is in the function __start which tends to
use:
jal __libc_start_main
even though __libc_start_main may not be in the same 256MB-aligned region.
This function ends up as part of the initial runtime code in crt1.o.
--
You are receiving this mail because:
You are on the CC list for the bug.