public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard
@ 2007-06-20 17:48 equinox-gccbug at diac24 dot net
2007-06-20 17:50 ` [Bug c/32434] " equinox-gccbug at diac24 dot net
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: equinox-gccbug at diac24 dot net @ 2007-06-20 17:48 UTC (permalink / raw)
To: gcc-bugs
When using, e.g., #pragma GCC visibility push(internal) together with
-fstack-protector and PIC code, gcc emits an invalid R_386_GOTOFF relocation to
__stack_chk_guard.
(Testcase follows)
Note that the problem does not happen with -fvisibility,
__attribute__((visibility)) or when there is a reference to __stack_chk_guard
before the #pragma.
--
Summary: #pragma GCC visibility causes invalid relocation to
__stach_chk_guard
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: equinox-gccbug at diac24 dot net
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32434
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/32434] #pragma GCC visibility causes invalid relocation to __stach_chk_guard
2007-06-20 17:48 [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard equinox-gccbug at diac24 dot net
@ 2007-06-20 17:50 ` equinox-gccbug at diac24 dot net
2007-06-20 17:51 ` equinox-gccbug at diac24 dot net
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: equinox-gccbug at diac24 dot net @ 2007-06-20 17:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from equinox-gccbug at diac24 dot net 2007-06-20 17:50 -------
Created an attachment (id=13748)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13748&action=view)
Test source
Try with different flags as shown in test.sh
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32434
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/32434] #pragma GCC visibility causes invalid relocation to __stach_chk_guard
2007-06-20 17:48 [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard equinox-gccbug at diac24 dot net
2007-06-20 17:50 ` [Bug c/32434] " equinox-gccbug at diac24 dot net
@ 2007-06-20 17:51 ` equinox-gccbug at diac24 dot net
2007-06-20 17:54 ` equinox-gccbug at diac24 dot net
2007-06-20 20:53 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: equinox-gccbug at diac24 dot net @ 2007-06-20 17:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from equinox-gccbug at diac24 dot net 2007-06-20 17:51 -------
Created an attachment (id=13749)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13749&action=view)
Script for compiling test.c with different flags
# sh ./test.sh
-fno-stack-protector :
-fno-stack-protector -fvisibility=internal:
-fno-stack-protector -DVIS_ATTR:
-fno-stack-protector -DVIS_PRAGMA:
-fno-stack-protector -DVIS_PRAGMA -DREF_BEFORE:
-fstack-protector-all :
-fstack-protector-all -fvisibility=internal:
-fstack-protector-all -DVIS_ATTR:
-fstack-protector-all -DVIS_PRAGMA:
/usr/lib/gcc/i686-colt-linux-gnu/4.1.2/../../../../i686-colt-linux-gnu/bin/ld:
/tmp/ccHCfgCk.o(.text+0x14): unresolvable relocation against symbol
`__stack_chk_guard@@LIBSSP_1.0'
/usr/lib/gcc/i686-colt-linux-gnu/4.1.2/../../../../i686-colt-linux-gnu/bin/ld:
final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
-fstack-protector-all -DVIS_PRAGMA -DREF_BEFORE:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32434
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/32434] #pragma GCC visibility causes invalid relocation to __stach_chk_guard
2007-06-20 17:48 [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard equinox-gccbug at diac24 dot net
2007-06-20 17:50 ` [Bug c/32434] " equinox-gccbug at diac24 dot net
2007-06-20 17:51 ` equinox-gccbug at diac24 dot net
@ 2007-06-20 17:54 ` equinox-gccbug at diac24 dot net
2007-06-20 20:53 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: equinox-gccbug at diac24 dot net @ 2007-06-20 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from equinox-gccbug at diac24 dot net 2007-06-20 17:54 -------
# gcc -v
Using built-in specs.
Target: i686-colt-linux-gnu
Configured with: ../gcc-4.1.2/configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --build=i686-colt-linux-gnu --host=i686-colt-linux-gnu
--target=i686-colt-linux-gnu --enable-libssp --enable-shared
--enable-__cxa_atexit --enable-threads=posix --libexecdir=/usr/lib
--enable-clocale --enable-languages=c,c++,objc,obj-c++ --enable-multilib=no
Thread model: posix
gcc version 4.1.2
# uname -a
Linux neptune 2.6.22-rc4 #19 PREEMPT Sat Jun 9 18:51:59 CEST 2007 i686 athlon-4
i386 GNU/Linux
# /lib/libc.so.6 | grep 'GNU C'
GNU C Library stable release version 2.3.6, by Roland McGrath et al.
Compiled by GNU CC version 4.1.0 colt stage0.
cmdline / output see test.sh.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32434
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/32434] #pragma GCC visibility causes invalid relocation to __stach_chk_guard
2007-06-20 17:48 [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard equinox-gccbug at diac24 dot net
` (2 preceding siblings ...)
2007-06-20 17:54 ` equinox-gccbug at diac24 dot net
@ 2007-06-20 20:53 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-20 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-06-20 20:53 -------
Related to PR 20297.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |20297
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32434
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-20 20:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-20 17:48 [Bug c/32434] New: #pragma GCC visibility causes invalid relocation to __stach_chk_guard equinox-gccbug at diac24 dot net
2007-06-20 17:50 ` [Bug c/32434] " equinox-gccbug at diac24 dot net
2007-06-20 17:51 ` equinox-gccbug at diac24 dot net
2007-06-20 17:54 ` equinox-gccbug at diac24 dot net
2007-06-20 20:53 ` pinskia at gcc dot gnu dot 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).