2001-12-28 16:41:36

by Wichert Akkerman

[permalink] [raw]
Subject: link error in SCC driver

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.

--
_________________________________________________________________
/[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 |


2001-12-28 16:57:18

by Dave Jones

[permalink] [raw]
Subject: Re: link error in SCC driver

On Fri, 28 Dec 2001, Wichert Akkerman wrote:

> 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.
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2001-12-28 16:59:38

by Wichert Akkerman

[permalink] [raw]
Subject: Re: link error in SCC driver

Previously Dave Jones wrote:
> 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.

--
_________________________________________________________________
/[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 |

2001-12-28 17:09:18

by Dan Chen

[permalink] [raw]
Subject: Re: link error in SCC driver

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: http://www.unc.edu/~crimsun/pubkey.gpg.asc

On Fri, 28 Dec 2001, Wichert Akkerman wrote:

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

2001-12-29 03:40:17

by Keith Owens

[permalink] [raw]
Subject: Re: link error in SCC driver

On Fri, 28 Dec 2001 17:59:08 +0100,
Wichert Akkerman <[email protected]> wrote:
>[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