2008-10-20 20:09:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: discarded `.exit.text' debugging?

Last night I got these in my build logs:

| `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
| `.exit.text' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o

i.e. not much context. Is there an easy way to find out who's the
offender?

Thx!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2008-10-20 20:54:16

by linux-os (Dick Johnson)

[permalink] [raw]
Subject: Re: discarded `.exit.text' debugging?

On Mon, 20 Oct 2008, Geert Uytterhoeven wrote:

> Last night I got these in my build logs:
>
> | `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
> | `.exit.text' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
>
> i.e. not much context. Is there an easy way to find out who's the
> offender?
>
> Thx!
>
> Gr{oetje,eeting}s,
>
> Geert
>

Look in .built-in.o.cmd for the files included in that object
file. It's a start. Something like

../drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c

With an exit(EX_SOFTWARE) or similar that was not supposed to
be included in the kernel build because it is for user-mode
build code.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.25.17 on an i686 machine (4787.24 BogoMips).
My book : http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

2008-10-20 22:01:49

by Andreas Schwab

[permalink] [raw]
Subject: Re: discarded `.exit.text' debugging?

Geert Uytterhoeven <[email protected]> writes:

> Last night I got these in my build logs:
>
> | `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
> | `.exit.text' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
>
> i.e. not much context. Is there an easy way to find out who's the
> offender?

You could try giving each .exit.text section a unique name per object
file (so that "ld -r" does not merge them) and modify EXIT_TEXT to
collect all those sections during the final link.

Andreas.

--
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstra?e 5, 90409 N?rnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."

2008-10-26 18:33:15

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: discarded `.exit.text' debugging?

On Mon, 20 Oct 2008, Geert Uytterhoeven wrote:
> Last night I got these in my build logs:
>
> | `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
> | `.exit.text' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
>
> i.e. not much context. Is there an easy way to find out who's the
> offender?

I also didn't get any section mismatch warnings about them with
CONFIG_DEBUG_SECTION_MISMATCH=y.

So I went the hard way (i.e. maual bisection on CONFIG symbols) and found 2
bogus __exit marks in drivers/rtc/rtc-ds3234.c and drivers/hwmon/w83781d.c.

Patches to fix them have been sent.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds