public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102625] New: [meta-bug] -mcmodel=large can't link
@ 2021-10-06  0:09 hjl.tools at gmail dot com
  2021-10-06 12:45 ` [Bug target/102625] " hjl.tools at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-06  0:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102625

            Bug ID: 102625
           Summary: [meta-bug] -mcmodel=large can't link
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: meta-bug
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
        Depends on: 95620, 98693
  Target Milestone: ---
            Target: x86-64

[hjl@gnu-cfl-2 tmp]$ cat l.c
#include <stdio.h>

char foo[0x100000000] = { 1 };

int
main ()
{
  printf ("%p\n", foo);
  return 0;
}
[hjl@gnu-cfl-2 tmp]$ gcc l.c -mcmodel=large
/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o: in function
`deregister_tm_clones':
crtstuff.c:(.text+0x1): relocation truncated to fit: R_X86_64_32 against symbol
`__TMC_END__' defined in .data section in a.out
crtstuff.c:(.text+0x7): relocation truncated to fit: R_X86_64_32S against
`.tm_clone_table'
crtstuff.c:(.text+0x18): relocation truncated to fit: R_X86_64_32 against
`.tm_clone_table'
/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o: in function
`register_tm_clones':
crtstuff.c:(.text+0x31): relocation truncated to fit: R_X86_64_32 against
symbol `__TMC_END__' defined in .data section in a.out
crtstuff.c:(.text+0x38): relocation truncated to fit: R_X86_64_32S against
`.tm_clone_table'
crtstuff.c:(.text+0x5a): relocation truncated to fit: R_X86_64_32 against
`.tm_clone_table'
/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o: in function
`__do_global_dtors_aux':
crtstuff.c:(.text+0x76): relocation truncated to fit: R_X86_64_PC32 against
`.bss'
crtstuff.c:(.text+0x88): relocation truncated to fit: R_X86_64_PC32 against
`.bss'
collect2: error: ld returned 1 exit status
[hjl@gnu-cfl-2 tmp]$


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95620
[Bug 95620] [10 Regression] relocation truncated to fit: R_X86_64_PC32 against
`.bss'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98693
[Bug 98693] Compiling with -mcmodel=large emits .eh_frame with R_X86_64_PC32

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

* [Bug target/102625] [meta-bug] -mcmodel=large can't link
  2021-10-06  0:09 [Bug target/102625] New: [meta-bug] -mcmodel=large can't link hjl.tools at gmail dot com
@ 2021-10-06 12:45 ` hjl.tools at gmail dot com
  2021-10-06 12:51 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-06 12:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102625

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-10-06
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
               Host|                            |zhang

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

* [Bug target/102625] [meta-bug] -mcmodel=large can't link
  2021-10-06  0:09 [Bug target/102625] New: [meta-bug] -mcmodel=large can't link hjl.tools at gmail dot com
  2021-10-06 12:45 ` [Bug target/102625] " hjl.tools at gmail dot com
@ 2021-10-06 12:51 ` hjl.tools at gmail dot com
  2021-10-19  9:26 ` fw at gcc dot gnu.org
  2023-07-07  8:54 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-06 12:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102625

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
1. Need large model crtbegin*.o and crtend*.o.
2. Need large mode libgcc.a, libgcc_eh.a and libgcov.a.
3. Need large mode lib*.a if we want to link with lib*.a
4. Need the large model libc.a if we want to support large model static
executable.

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

* [Bug target/102625] [meta-bug] -mcmodel=large can't link
  2021-10-06  0:09 [Bug target/102625] New: [meta-bug] -mcmodel=large can't link hjl.tools at gmail dot com
  2021-10-06 12:45 ` [Bug target/102625] " hjl.tools at gmail dot com
  2021-10-06 12:51 ` hjl.tools at gmail dot com
@ 2021-10-19  9:26 ` fw at gcc dot gnu.org
  2023-07-07  8:54 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2021-10-19  9:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102625

Florian Weimer <fw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at gcc dot gnu.org

--- Comment #2 from Florian Weimer <fw at gcc dot gnu.org> ---
libc_nonshared.a and crt1.o from glibc need build changes even for dynamic
linking.

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

* [Bug target/102625] [meta-bug] -mcmodel=large can't link
  2021-10-06  0:09 [Bug target/102625] New: [meta-bug] -mcmodel=large can't link hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2021-10-19  9:26 ` fw at gcc dot gnu.org
@ 2023-07-07  8:54 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102625
Bug 102625 depends on bug 95620, which changed state.

Bug 95620 Summary: [10 Regression] relocation truncated to fit: R_X86_64_PC32 against `.bss'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95620

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

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

end of thread, other threads:[~2023-07-07  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  0:09 [Bug target/102625] New: [meta-bug] -mcmodel=large can't link hjl.tools at gmail dot com
2021-10-06 12:45 ` [Bug target/102625] " hjl.tools at gmail dot com
2021-10-06 12:51 ` hjl.tools at gmail dot com
2021-10-19  9:26 ` fw at gcc dot gnu.org
2023-07-07  8:54 ` rguenth at gcc dot gnu.org

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).