public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error
@ 2015-09-01 4:52 amodra at gmail dot com
2015-09-01 4:53 ` [Bug target/67417] " amodra at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: amodra at gmail dot com @ 2015-09-01 4:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
Bug ID: 67417
Summary: powerpc64 bootstrap with -mcmodel=small results in
linker error
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: amodra at gmail dot com
Target Milestone: ---
To test recent powerpc64 linker changes I attempted to bootstrap gcc-5 with
-mcmodel=small, and ran into
/home/amodra/gnu/powerpc64-linux/bin/ld: libbackend.a(sel-sched-ir.o): In
function `loop_iterator::loop_iterator(loop**, unsigned int)':
sel-sched-ir.c:(.text+0x116f0): call to `loop_iterator::loop_iterator(loop**,
unsigned int)' lacks nop, can't restore toc; (-mcmodel=small toc adjust stub)
On investigating, I see there really isn't a nop, and the call is to a group
with a different toc pointer. This despite the destination being defined in
the same file. However, it is weak and there's another definition.
nm -o gcc/*.o | grep _ZN13loop_iteratorC1EPP4loopj
gcc/ipa-inline-analysis.o:0000000000000420 W _ZN13loop_iteratorC1EPP4loopj
gcc/sel-sched-ir.o:00000000000013e0 W _ZN13loop_iteratorC1EPP4loopj
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
@ 2015-09-01 4:53 ` amodra at gmail dot com
2015-09-01 5:44 ` amodra at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gmail dot com @ 2015-09-01 4:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |powerpc64-linux
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-09-01
Assignee|unassigned at gcc dot gnu.org |amodra at gmail dot com
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
2015-09-01 4:53 ` [Bug target/67417] " amodra at gmail dot com
@ 2015-09-01 5:44 ` amodra at gmail dot com
2015-09-01 13:17 ` amodra at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gmail dot com @ 2015-09-01 5:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
BTW, the linker error message doesn't identify the correct function, which is
looking like a linker bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
2015-09-01 4:53 ` [Bug target/67417] " amodra at gmail dot com
2015-09-01 5:44 ` amodra at gmail dot com
@ 2015-09-01 13:17 ` amodra at gmail dot com
2015-09-01 23:03 ` amodra at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gmail dot com @ 2015-09-01 13:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
Yes, exactly. When a COMDAT group in another file is chosen, the rs6000
predicate current_file_function_operand gets the wrong answer. COMDAT group
functions use weak symbols, and weak symbols more generally have the behaviour
exhibited here by COMDAT group functions: A symbol defined in the same object
file might be overridden by the same symbol defined in another file.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
` (2 preceding siblings ...)
2015-09-01 13:17 ` amodra at gmail dot com
@ 2015-09-01 23:03 ` amodra at gcc dot gnu.org
2015-09-01 23:05 ` amodra at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gcc dot gnu.org @ 2015-09-01 23:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
--- Comment #4 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Tue Sep 1 23:03:19 2015
New Revision: 227386
URL: https://gcc.gnu.org/viewcvs?rev=227386&root=gcc&view=rev
Log:
[RS6000] Weak functions may not be file local
A weak symbol defined in the current object file may not turn out to
be the definition used at link time, if other copies of the symbol
exist. This means they can't be considered file local.
PR target/67417
* config/rs6000/predicates.md (current_file_function_operand): Don't
return true for weak symbols.
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
` (3 preceding siblings ...)
2015-09-01 23:03 ` amodra at gcc dot gnu.org
@ 2015-09-01 23:05 ` amodra at gcc dot gnu.org
2015-09-01 23:26 ` amodra at gcc dot gnu.org
2015-09-01 23:28 ` amodra at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gcc dot gnu.org @ 2015-09-01 23:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
--- Comment #5 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Tue Sep 1 23:04:58 2015
New Revision: 227387
URL: https://gcc.gnu.org/viewcvs?rev=227387&root=gcc&view=rev
Log:
[RS6000] Weak functions may not be file local
A weak symbol defined in the current object file may not turn out to
be the definition used at link time, if other copies of the symbol
exist. This means they can't be considered file local.
PR target/67417
* config/rs6000/predicates.md (current_file_function_operand): Don't
return true for weak symbols.
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Likewise.
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/rs6000/predicates.md
branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
` (4 preceding siblings ...)
2015-09-01 23:05 ` amodra at gcc dot gnu.org
@ 2015-09-01 23:26 ` amodra at gcc dot gnu.org
2015-09-01 23:28 ` amodra at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gcc dot gnu.org @ 2015-09-01 23:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
--- Comment #6 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Tue Sep 1 23:25:48 2015
New Revision: 227389
URL: https://gcc.gnu.org/viewcvs?rev=227389&root=gcc&view=rev
Log:
[RS6000] Weak functions may not be file local
A weak symbol defined in the current object file may not turn out to
be the definition used at link time, if other copies of the symbol
exist. This means they can't be considered file local.
PR target/67417
* config/rs6000/predicates.md (current_file_function_operand): Don't
return true for weak symbols.
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Likewise.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/rs6000/predicates.md
branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/67417] powerpc64 bootstrap with -mcmodel=small results in linker error
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
` (5 preceding siblings ...)
2015-09-01 23:26 ` amodra at gcc dot gnu.org
@ 2015-09-01 23:28 ` amodra at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: amodra at gmail dot com @ 2015-09-01 23:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.4
--- Comment #7 from Alan Modra <amodra at gmail dot com> ---
Fixed all active branches.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-01 23:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 4:52 [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error amodra at gmail dot com
2015-09-01 4:53 ` [Bug target/67417] " amodra at gmail dot com
2015-09-01 5:44 ` amodra at gmail dot com
2015-09-01 13:17 ` amodra at gmail dot com
2015-09-01 23:03 ` amodra at gcc dot gnu.org
2015-09-01 23:05 ` amodra at gcc dot gnu.org
2015-09-01 23:26 ` amodra at gcc dot gnu.org
2015-09-01 23:28 ` amodra 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).