This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/7577: GCC 3.1 has problems with -gdwarf+ option linking the linux kernel


>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==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]