public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17601] New: __start function can not reach __libc_start_main in different region
@ 2014-11-14 16:22 mips32r2 at gmail dot com
  2014-11-14 16:59 ` [Bug libc/17601] " mips32r2 at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mips32r2 at gmail dot com @ 2014-11-14 16:22 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-29 22:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 16:22 [Bug libc/17601] New: __start function can not reach __libc_start_main in different region mips32r2 at gmail dot com
2014-11-14 16:59 ` [Bug libc/17601] " mips32r2 at gmail dot com
2014-11-14 17:52 ` joseph at codesourcery dot com
2014-12-02 23:05 ` cvs-commit at gcc dot gnu.org
2014-12-02 23:12 ` jsm28 at gcc dot gnu.org
2014-12-03 22:41 ` mips32r2 at gmail dot com
2015-04-29 22:26 ` mips32r2 at gmail dot com
2015-04-29 22:28 ` mips32r2 at gmail dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).