public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "price at ifa dot hawaii dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/30153] -fPIC failure Date: Thu, 17 May 2007 02:19:00 -0000 [thread overview] Message-ID: <20070517021900.31623.qmail@sourceware.org> (raw) In-Reply-To: <bug-30153-9033@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from price at ifa dot hawaii dot edu 2007-05-17 03:19 ------- This is also a problem on my amd64 Gentoo laptop, using gcc version Gentoo 4.1.1-r3. I searched the binutils Bugzilla, but could not find a bug filed for this problem. Because the problem disappears when optimisation is turned on, the following line from the docs for gcc caught my eye: "GCC does not inline any functions when not optimizing unless you specify the `always_inline' attribute for the function". So I tried: price@neverland:/home/price/test>cat static_inline.c static void foo (void) __attribute__((always_inline)); static inline void foo (void) { } void baz (void (*f) (void)); void bar (void) { baz (foo); } price@neverland:/home/price/test>gcc -O0 -g -c -fPIC static_inline.c price@neverland:/home/price/test>gcc -shared -o static_inline.so static_inline.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: static_inline.o: relocation R_X86_64_PC32 against `foo' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status Should I take this bug over to binutils? -- price at ifa dot hawaii dot edu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |price at ifa dot hawaii dot | |edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30153
next prev parent reply other threads:[~2007-05-17 2:19 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-12-11 19:24 [Bug c/30153] New: " terra at gnome dot org 2006-12-24 4:49 ` [Bug target/30153] " pinskia at gcc dot gnu dot org 2007-05-17 2:19 ` price at ifa dot hawaii dot edu [this message] 2010-02-05 21:11 ` reza dot yazdani at amd dot com 2010-02-05 23:11 ` reza dot yazdani at amd dot com [not found] <bug-30153-4@http.gcc.gnu.org/bugzilla/> 2011-12-22 3:24 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070517021900.31623.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).