public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: aloeff@de.ibm.com
To: gcc-gnats@gcc.gnu.org
Subject: c/7577: GCC 3.1 has problems with -gdwarf+ option linking the linux kernel
Date: Mon, 12 Aug 2002 04:36:00 -0000	[thread overview]
Message-ID: <20020812095556.22960.qmail@sources.redhat.com> (raw)


>Number:         7577
>Category:       c
>Synopsis:       GCC 3.1 has problems with -gdwarf+ option linking the linux kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 12 02:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Loeffler
>Release:        gcc version 3.1
>Organization:
>Environment:
powerpc-linux cross compiler
Configured with: ../configure --host=i586-pc-linux-gnu --target=powerpc-linux --prefix=/opt/fsp/i586-pc-linux-gnu/local --enable-shared --enable-languages=c,c++,f77 --with-headers=/opt/fsp/powerpc-linux/include --with-libs=/opt/fsp/powerpc-linux/lib --with-cpu=403 --without-fp
Thread model: single
>Description:
while trying to compile and link the linux kernel we get 
a lot of messeages like the lines below:
arch/ppc/kernel/kernel.o(.debug+0x4e678d): undefined reference to `.L_E7576'
arch/ppc/kernel/kernel.o(.debug+0x4e67a3): undefined reference to `.L_E7577'
arch/ppc/kernel/kernel.o(.debug+0x4e67b9): undefined reference to `.L_E7580'
we see this if we compile with -gdwarf+

we then tried to figure out where those .L_E* symbols came from
obviously they were generated by the compiler
our testcase is derived from one of the kernel source files
and it looks like that the __inline__ is causing the problem

we compiled the code with:
powerpc-linux-gcc -D__KERNEL__ -Wall -O2 -gdwarf+ -mcpu=403 -Wa,-m403 -save-temps -c bla.c
and then grep'ed for the symbols: powerpc-linux-objdump -Sawx bla.o | grep L_E
00000000         *UND*	00000000 .L_E9269
00000000         *UND*	00000000 .L_E9268
00000000         *UND*	00000000 .L_E9271
00000000         *UND*	00000000 .L_E9272

the symbols are gone without the __inline__
or using -gdwarf-2 option instead but that doesn't help us
we need dwarf+ for our debugger
>How-To-Repeat:
powerpc-linux-gcc -D__KERNEL__ -Wall -O2 -gdwarf+ -mcpu=403 -Wa,-m403 -save-temps -c bla.c
powerpc-linux-objdump -Sawx bla.o | grep L_E
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bla.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bla.c"

LyoqCiAqIEFuZHJlYXMgTG9lZmZsZXIgYW5kIEkgdHJpZWQgdG8gZmlndXJlIG91dCB3aGVyZSB0
aGUgLkxfRSogc3ltYm9scyBjYW1lCiAqIGZyb20uIE9idmlvdXNseSB0aGV5IHdoZXJlIGdlbmVy
YXRlZCBieSB0aGUgY29tcGlsZXIgaW4gZnVuY3Rpb25zIHdpdGgKICogbWFnaWNhbCByZXBsYWNl
bWVudHMgbGlrZSB0aGUgb25lIGluIHRoZSBjb2RlIGJlbG93IC4uLiBTdXByaXNpbmdseSBpbiB0
aGlzCiAqIGNhc2UgdGhlIGNvZGUgY291bGQgbG9vayBtdWNoIHNpbXBsZXIuCiAqIHdpdGhvdXQg
X19pbmxpbmVfXyB0aGUgY29kZSBjb21waWxlcyB3aXRob3V0IHRoZSBMX0Ugc3ltYm9sCiAqIAog
KiBwb3dlcnBjLWxpbnV4LWdjYyAtRF9fS0VSTkVMX18gLVdhbGwgLU8yIC1nZHdhcmYrIC1tY3B1
PTQwMyBcCiAqICAgICAgICAgICAgICAgICAgIC1XYSwtbTQwMyAtYyBibGEuYwogKiBwb3dlcnBj
LWxpbnV4LW9iamR1bXAgLVNhd3ggYmxhLm8gfCBncmVwIExfRQogKi8KCgojaW5jbHVkZSA8bGlu
dXgvaWRlLmg+CgoKCi8qIGNhc3RzIGFyZSBuZWNlc3NhcnkgZm9yIGNvbnN0YW50cywgYmVjYXVz
ZSB3ZSBuZXZlciBrbm93IGhvdyBmb3Igc3VyZQogKiBob3cgVS9VTC9VTEwgbWFwIHRvIF9fdTE2
LCBfX3UzMiwgX191NjQuIEF0IGxlYXN0IG5vdCBpbiBhIHBvcnRhYmxlIHdheS4KICovCiNkZWZp
bmUgbXlfX19zd2FiMTYoeCkgXAooeyBcCiAgICAgICAgX191MTYgX194ID0gKHgpOyBcCiAgICAg
ICAgKChfX3UxNikoIFwKICAgICAgICAgICAgICAgICgoKF9fdTE2KShfX3gpICYgKF9fdTE2KTB4
MDBmZlUpIDw8IDgpIHwgXAogICAgICAgICAgICAgICAgKCgoX191MTYpKF9feCkgJiAoX191MTYp
MHhmZjAwVSkgPj4gOCkgKSk7IFwKfSkKCiNkZWZpbmUgbXlfX3N3YWIxNih4KSBcCiAgICAoX19i
dWlsdGluX2NvbnN0YW50X3AoKF9fdTE2KSh4KSkgPyBcCiAgICAgbXlfX19zd2FiMTYoKHgpKSA6
IFwKICAgICBteV9fZnN3YWIxNigoeCkpKQoKI2RlZmluZSBteV9fYXJjaF9fc3dhYjE2KHgpICh7
IF9fdTE2IF9fdG1wID0gKHgpIDsgbXlfX19zd2FiMTYoX190bXApOyB9KQoKI2lmIDEKZXh0ZXJu
IF9faW5saW5lX18gX19jb25zdF9fIF9fdTE2IG15X19mc3dhYjE2KF9fdTE2IHgpCiNlbHNlCmV4
dGVybiBfX2NvbnN0X18gX191MTYgbXlfX2Zzd2FiMTYoX191MTYgeCkKI2VuZGlmCnsKICAgICAg
ICByZXR1cm4gbXlfX2FyY2hfX3N3YWIxNih4KTsKfQoKCnVuc2lnbmVkIHNob3J0IGJsYWJsYWJs
YShzdHJ1Y3QgaGRfZHJpdmVpZCAqaWQpCnsKICAgICAgICBpZC0+Y29uZmlnICAgICAgICAgPSBt
eV9fc3dhYjE2KGlkLT5jb25maWcpOwogICAgICAgIHJldHVybiAwOwp9Cg==


             reply	other threads:[~2002-08-12  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12  4:36 aloeff [this message]
2003-01-08  2:13 bangerth
2003-01-08 11:26 Andreas Loeffler

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=20020812095556.22960.qmail@sources.redhat.com \
    --to=aloeff@de.ibm.com \
    --cc=gcc-gnats@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).