public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/46275] -masm=intel -fPIC causes global offset table issues
Date: Wed, 03 Nov 2010 08:48:00 -0000	[thread overview]
Message-ID: <20101103084800.9lWQRt5uukRnL7_2BWZbVSDX45J13wN5Vli4IbDSKKA@z> (raw)
In-Reply-To: <bug-46275-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46275

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-03 08:47:48 UTC ---
For some reason, the addend in R_386_GOTPC reloc is missing when compiled with
-masm=intel. The objdump difference between -masm=att [hello.o] that works and
-masm=intel [hello_.o] that fails is:

@@ -1,5 +1,5 @@

-hello.o:     file format elf32-i386
+hello_.o:     file format elf32-i386


 Disassembly of section .text:
@@ -12,7 +12,7 @@
    7:    83 ec 1c                 sub    $0x1c,%esp
    a:    e8 fc ff ff ff           call   b <main+0xb>
             b: R_386_PC32    __i686.get_pc_thunk.bx
-   f:    81 c3 02 00 00 00        add    $0x2,%ebx
+   f:    81 c3 00 00 00 00        add    $0x0,%ebx
             11: R_386_GOTPC    _GLOBAL_OFFSET_TABLE_
   15:    8d 83 00 00 00 00        lea    0x0(%ebx),%eax
             17: R_386_GOTOFF    .rodata


  parent reply	other threads:[~2010-11-03  8:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 18:30 [Bug c/46275] New: " hezekiahehud at gmail dot com
2010-11-02 18:30 ` [Bug c/46275] " hezekiahehud at gmail dot com
2010-11-02 18:31 ` [Bug target/46275] " pinskia at gcc dot gnu.org
2010-11-02 18:33 ` hezekiahehud at gmail dot com
2010-11-02 18:35 ` hezekiahehud at gmail dot com
2010-11-02 18:40 ` pinskia at gcc dot gnu.org
2010-11-02 18:54 ` hezekiahehud at gmail dot com
2010-11-02 18:59 ` pinskia at gcc dot gnu.org
2010-11-02 19:08 ` hezekiahehud at gmail dot com
2010-11-02 21:07 ` ubizjak at gmail dot com
2010-11-03  8:48 ` ubizjak at gmail dot com [this message]
2010-11-03 14:03 ` hjl.tools at gmail dot com
2010-11-03 14:13 ` hezekiahehud at gmail dot com

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=20101103084800.9lWQRt5uukRnL7_2BWZbVSDX45J13wN5Vli4IbDSKKA@z \
    --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: link
Be 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).