Skip to contentSkip to conversation

link error in SCC driver

DISCUSSION Wichert Akkerman 4 participants 5 messages Dec 28, 2001 – Dec 29, 2001

lore
Share & tools
lore
#0 lore raw

If I compile a kernel with a recent binutils and the scc driver I get the now famous linking error:

net/network.o(.text.lock+0x2b38): undefined reference to `local symbols in discarded section .text.exit'

Stock 2.4.17 kernel source, GNU ld version 2.11.92.0.12.3 20011121.

Wichert.

Signature · 4 lines
  _________________________________________________________________
 /[email protected]         This space intentionally left occupied \
| [email protected]            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |
#1 lore raw
Quoted 5 lines · Wichert Akkerman

If I compile a kernel with a recent binutils and the scc driver I get the now famous linking error:

net/network.o(.text.lock+0x2b38): undefined reference to `local symbols in discarded section .text.exit'

output of Keiths reference_discarded.pl would be useful.
http://kernelnewbies.org/scripts/reference_discarded.pl

Dave.

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#2 lore raw
In reply to Wichert Akkerman
Quoted 2 lines · Previously Dave Jones

output of Keiths reference_discarded.pl would be useful.
http://kernelnewbies.org/scripts/reference_discarded.pl

Hmm, bugger. It's nog even the SCC driver as I guessed:

[maltimi;~/linux]-36> perl ../reference_discarded.pl Finding objects, 443 objects, ignoring 0 module(s) Finding conglomerates, ignoring 37 conglomerate(s) Scanning objects
Error: ./net/ipv4/netfilter/ip_nat_snmp_basic.o .text.lock refers to 0000004c R_386_PC32 .text.exit

Wichert.

Signature · 4 lines
  _________________________________________________________________
 /[email protected]         This space intentionally left occupied \
| [email protected]            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |
#3 lore raw

Yup, was just going to ask if you were compiling netfilter options statically or modularly. I've gotten the same error (as has Adrian Bunk and perhaps countless others) by compiling them in statically, so for now I just compile them as modules.

---
Dan Chen [email protected]
GPG key: www.unc.edu/~crimsun/pubkey.gpg.asc

Quoted 11 lines · Wichert Akkerman

Hmm, bugger. It's nog even the SCC driver as I guessed:

[maltimi;~/linux]-36> perl ../reference_discarded.pl Finding objects, 443 objects, ignoring 0 module(s) Finding conglomerates, ignoring 37 conglomerate(s) Scanning objects
Error: ./net/ipv4/netfilter/ip_nat_snmp_basic.o .text.lock refers to 0000004c R_386_PC32 .text.exit

Wichert.

#4 lore raw
In reply to Wichert Akkerman
Quoted 5 lines · Wichert Akkerman

[maltimi;~/linux]-36> perl ../reference_discarded.pl Finding objects, 443 objects, ignoring 0 module(s) Finding conglomerates, ignoring 37 conglomerate(s) Scanning objects
Error: ./net/ipv4/netfilter/ip_nat_snmp_basic.o .text.lock refers to 0000004c R_386_PC32 .text.exit

Yep, the broader problem of lock handling in discarded sections leaving dangling references in section .text.lock. See [patch] 2.4.18-pre1 replace .text.lock with .subsection.
http://marc.theaimsgroup.com/?l=linux-kernel&m=100950122410373&w=2