Bug 1383075 - -fstack-protector-strong: undefined reference to `.LCTOC0'
Summary: -fstack-protector-strong: undefined reference to `.LCTOC0'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc
Version: DTS 7.0 RHEL 7
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: alpha
: 6.0
Assignee: Jakub Jelinek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-09 15:51 UTC by Jan Kratochvil
Modified: 2017-04-26 09:32 UTC (History)
8 users (show)

Fixed In Version: devtoolset-6-gcc-6.3.1-2.2.el7
Doc Type: Bug Fix
Doc Text:
Due to a bug in the rs6000 backend, where a TOC ("Table of Contents") was not correctly initialized, a valid program might have failed to link if the -fstack-protector-strong and -mminimal-toc command-line options were used. The bug has been fixed and the program now links.
Clone Of:
Environment:
Last Closed: 2017-04-26 09:32:56 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 77957 0 None None None 2016-10-12 16:37:10 UTC
Red Hat Product Errata RHBA-2017:1143 0 normal SHIPPED_LIVE devtoolset-6-gcc bug fix update 2017-04-26 13:30:26 UTC

Description Jan Kratochvil 2016-10-09 15:51:38 UTC
Description of problem:
Building GDB with custom flags fails with $subj error message.

Version-Release number of selected component (if applicable):
FAIL: devtoolset-6-gcc-6.2.1-2.el7.ppc64le
PASS: gcc-4.8.5-11.el7.ppc64le
43b831cb453921462b3a296e9796837cd71c1cde binutils-gdb.git

How reproducible:
Always.

Steps to Reproduce:
git clone git://sourceware.org/git/binutils-gdb.git;cd binutils-gdb;git checkout 43b831cb453921462b3a296e9796837cd71c1cde
CXXFLAGS=-fstack-protector-strong ./configure;make
or
CFLAGS=-fstack-protector-strong CXXFLAGS=-fstack-protector-strong LDFLAGS=-fstack-protector-strong ./configure;make

Actual results:
...
g++ -fstack-protector-strong -mminimal-toc  -static-libstdc++ -static-libgcc -fstack-protector-strong   \
        -o gdb gdb.o [...]
ppc-linux.o: In function `ppc64_64bit_inferior_p(long)':
ppc-linux.c:(.text+0x7c): undefined reference to `.LCTOC0'
continuations.o: In function `do_my_continuations(continuation**, int)':
continuations.c:(.text+0x1bc): undefined reference to `.LCTOC0'
namespace.o: In function `add_using_directive(using_direct**, char const*, char const*, char const*, char const*, VEC_const_char_ptr*, int, obstack*)':
namespace.c:(.text+0x148): undefined reference to `.LCTOC0' 
gdb_obstack.o: In function `obconcat(obstack*, ...)':
gdb_obstack.c:(.text+0x20): undefined reference to `.LCTOC0'
gdb_obstack.o: In function `obstack_strdup(obstack*, char const*)': 
gdb_obstack.c:(.text+0x2c0): undefined reference to `.LCTOC0'
trad-frame.o:trad-frame.c:(.text+0xa0): more undefined references to `.LCTOC0' follow 
collect2: error: ld returned 1 exit status
Makefile:1421: recipe for target 'gdb' failed

Expected results:
Built GDB.

Additional info:
43b831cb453921462b3a296e9796837cd71c1cde is just current binutils-gdb.git trunk hash.

https://beaker.engineering.redhat.com/recipes/3150927
 = RHEL-7.3-20161007.n.0 Server ppc64le

Sure it is not a blocker for me, it just failed to build for me with my normal custom flags.

Comment 6 Michael Petlan 2017-02-15 14:21:59 UTC
Reproduced with devtoolset-6-gcc-6.2.1-3.1.el7
Verified with   devtoolset-6-gcc-6.3.1-2.2.el7

VERIFIED

Comment 8 errata-xmlrpc 2017-04-26 09:32:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1143


Note You need to log in before you can comment on or make changes to this bug.