* 2.6.3 compilation problem
@ 2004-03-11 6:55 Sourav Sen
2004-03-11 6:57 ` Zhang, Yanmin
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Sourav Sen @ 2004-03-11 6:55 UTC (permalink / raw)
To: linux-ia64
Hi,
While compiling Linux 2.6.3 + ia64 patch for it, using
the following:
[sourav]$ gcc --version
gcc (GCC) 3.1
[sourav]$ as --version
GNU assembler 2.13.90 20030125
[sourav]$ ld --version
GNU ld version 2.12.90 20020604
I get the following error while doing
make vmlinux
------
[...]
IKCFG kernel/config_data.h
CC kernel/configs.o
LD kernel/built-in.o
GEN .version
CHK include/linux/compile.h
dnsdomainname: Host name lookup failure
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `serio_close':
drivers/built-in.o(.text+0x130c02): undefined reference to `local symbols in
discarded section .exit.text'
drivers/built-in.o: In function `serio_init':
drivers/built-in.o(.init.text+0x10502): undefined reference to `local
symbols in discarded section .exit.text'
make: *** [.tmp_vmlinux1] Error 1
[...]
--------
Any idea what I am doing wrong?
TIA
--Sourav
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
@ 2004-03-11 6:57 ` Zhang, Yanmin
2004-03-11 8:32 ` Liu, Benjamin
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Zhang, Yanmin @ 2004-03-11 6:57 UTC (permalink / raw)
To: linux-ia64
Did you enable CONFIG_HOTPLUG in your .config file?
Enable it and compile it again.
Yanmin
>-----Original Message-----
>From: linux-ia64-owner@vger.kernel.org [mailto:linux-ia64-
>owner@vger.kernel.org] On Behalf Of Sourav Sen
>Sent: 2004年3月11日 14:53
>To: linux-ia64@vger.kernel.org
>Subject: 2.6.3 compilation problem
>
>Hi,
>
>While compiling Linux 2.6.3 + ia64 patch for it, using
>the following:
>
>[sourav]$ gcc --version
>gcc (GCC) 3.1
>[sourav]$ as --version
>GNU assembler 2.13.90 20030125
>[sourav]$ ld --version
>GNU ld version 2.12.90 20020604
>
>I get the following error while doing
>make vmlinux
>
>------
>[...]
> IKCFG kernel/config_data.h
> CC kernel/configs.o
> LD kernel/built-in.o
> GEN .version
> CHK include/linux/compile.h
>dnsdomainname: Host name lookup failure
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
>drivers/built-in.o: In function `serio_close':
>drivers/built-in.o(.text+0x130c02): undefined reference to `local symbols
>in
>discarded section .exit.text'
>drivers/built-in.o: In function `serio_init':
>drivers/built-in.o(.init.text+0x10502): undefined reference to `local
>symbols in discarded section .exit.text'
>make: *** [.tmp_vmlinux1] Error 1
>[...]
>--------
>
>Any idea what I am doing wrong?
>
>TIA
>--Sourav
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
2004-03-11 6:57 ` Zhang, Yanmin
@ 2004-03-11 8:32 ` Liu, Benjamin
2004-03-11 18:37 ` Kenneth Chen
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Liu, Benjamin @ 2004-03-11 8:32 UTC (permalink / raw)
To: linux-ia64
To workaround the problem, you can append __attribute__((weak)) to the declaration of those discarded symbols defined in section ".exit.text".
Another workaround is to keep section ".exit.text" by modifying arch/ia64/vmlinux.lds.S.
The device driver author might be able to answer why it is written that way.
Thanks,
Pingping (Benjamin) Liu
Intel China Software Center
>-----Original Message-----
>From: linux-ia64-owner@vger.kernel.org
>[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Sourav Sen
>Sent: 2004Äê3ÔÂ11ÈÕ 14:53
>To: linux-ia64@vger.kernel.org
>Subject: 2.6.3 compilation problem
>
>
>Hi,
>
>While compiling Linux 2.6.3 + ia64 patch for it, using
>the following:
>
>[sourav]$ gcc --version
>gcc (GCC) 3.1
>[sourav]$ as --version
>GNU assembler 2.13.90 20030125
>[sourav]$ ld --version
>GNU ld version 2.12.90 20020604
>
>I get the following error while doing
>make vmlinux
>
>------
>[...]
> IKCFG kernel/config_data.h
> CC kernel/configs.o
> LD kernel/built-in.o
> GEN .version
> CHK include/linux/compile.h
>dnsdomainname: Host name lookup failure
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
>drivers/built-in.o: In function `serio_close':
>drivers/built-in.o(.text+0x130c02): undefined reference to
>`local symbols in
>discarded section .exit.text'
>drivers/built-in.o: In function `serio_init':
>drivers/built-in.o(.init.text+0x10502): undefined reference to `local
>symbols in discarded section .exit.text'
>make: *** [.tmp_vmlinux1] Error 1
>[...]
>--------
>
>Any idea what I am doing wrong?
>
>TIA
>--Sourav
>
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-ia64" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
2004-03-11 6:57 ` Zhang, Yanmin
2004-03-11 8:32 ` Liu, Benjamin
@ 2004-03-11 18:37 ` Kenneth Chen
2004-03-12 3:52 ` Liu, Benjamin
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kenneth Chen @ 2004-03-11 18:37 UTC (permalink / raw)
To: linux-ia64
>>>>> Liu, Benjamin wrote on Thu, March 11, 2004 12:33 AM
> To workaround the problem, you can append __attribute__((weak)) to the
> declaration of those discarded symbols defined in section ".exit.text".
>
> The device driver author might be able to answer why it is written that
> way.
The linker gets the award for least informative in this case, and it just
plain misleading. The culprit isn't the one printed. It lies somewhere
else.
- Ken
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (2 preceding siblings ...)
2004-03-11 18:37 ` Kenneth Chen
@ 2004-03-12 3:52 ` Liu, Benjamin
2004-03-12 5:42 ` H. J. Lu
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Liu, Benjamin @ 2004-03-12 3:52 UTC (permalink / raw)
To: linux-ia64
Sourav,
Could you please send out your configure file in attachment? I can not reproduce your issue even when I configured CONFIG_SERIO.
Ken, it's too early to make any judgement.
Thanks,
Pingping (Benjamin) Liu
Intel China Software Center
>-----Original Message-----
>From: Chen, Kenneth W
>Sent: 2004Äê3ÔÂ12ÈÕ 2:38
>To: Liu, Benjamin; Sourav Sen; linux-ia64@vger.kernel.org
>Subject: RE: 2.6.3 compilation problem
>
>
>>>>>> Liu, Benjamin wrote on Thu, March 11, 2004 12:33 AM
>> To workaround the problem, you can append
>__attribute__((weak)) to the
>> declaration of those discarded symbols defined in section
>".exit.text".
>>
>> The device driver author might be able to answer why it is
>written that
>> way.
>
>The linker gets the award for least informative in this case,
>and it just
>plain misleading. The culprit isn't the one printed. It lies
>somewhere
>else.
>
>- Ken
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (3 preceding siblings ...)
2004-03-12 3:52 ` Liu, Benjamin
@ 2004-03-12 5:42 ` H. J. Lu
2004-03-12 5:54 ` Chen, Kenneth W
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: H. J. Lu @ 2004-03-12 5:42 UTC (permalink / raw)
To: linux-ia64
From my very old binutils release note:
---
3. Update handling relocations against the discarded sections. You may
need to apply the kernel patch enclosed here to your kernel source. If
you still see things like
drivers/char/char.o(.data+0x46b4): undefined reference to `local symbols in discarded section .text.exit'
in the final kernel link, that means you have compiled a driver into
the kernel which has a reference to the symbol in a discarded section.
Please check all the builtin drivers and search for things like
static struct pci_driver xxx_pci_driver = {
...
remove: xxx_remove,
...
};
Then check to see if xxx_remove is marked with __devexit like
static void __devexit
xxx_remove (struct pci_dev *dev)
{
...
}
which means it will be discarded if the driver is builtin. If
xxx_remove may be discarded, please make sure there is
#ifdef MODULE
remove: xxx_remove,
#endif
so that xxx_remove won't be included when the driver is builtin.
---
Hope it help.
H.J.
On Fri, Mar 12, 2004 at 11:52:59AM +0800, Liu, Benjamin wrote:
> Sourav,
>
> Could you please send out your configure file in attachment? I can not reproduce your issue even when I configured CONFIG_SERIO.
>
> Ken, it's too early to make any judgement.
>
> Thanks,
> Pingping (Benjamin) Liu
> Intel China Software Center
>
>
> >-----Original Message-----
> >From: Chen, Kenneth W
> >Sent: 2004年3月12日 2:38
> >To: Liu, Benjamin; Sourav Sen; linux-ia64@vger.kernel.org
> >Subject: RE: 2.6.3 compilation problem
> >
> >
> >>>>>> Liu, Benjamin wrote on Thu, March 11, 2004 12:33 AM
> >> To workaround the problem, you can append
> >__attribute__((weak)) to the
> >> declaration of those discarded symbols defined in section
> >".exit.text".
> >>
> >> The device driver author might be able to answer why it is
> >written that
> >> way.
> >
> >The linker gets the award for least informative in this case,
> >and it just
> >plain misleading. The culprit isn't the one printed. It lies
> >somewhere
> >else.
> >
> >- Ken
> >
> >
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (4 preceding siblings ...)
2004-03-12 5:42 ` H. J. Lu
@ 2004-03-12 5:54 ` Chen, Kenneth W
2004-03-12 6:01 ` Keith Owens
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Chen, Kenneth W @ 2004-03-12 5:54 UTC (permalink / raw)
To: linux-ia64
>>>>> Liu, Benjamin on Thu, March 11, 2004 7:53 PM
> Could you please send out your configure file in
> attachment? I can not reproduce your issue even
> when I configured CONFIG_SERIO.
>
> Ken, it's too early to make any judgement.
Seen this before, and I just don't have the time to
track down exactly which module was the culprit. And
no, it's not from serio.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (5 preceding siblings ...)
2004-03-12 5:54 ` Chen, Kenneth W
@ 2004-03-12 6:01 ` Keith Owens
2004-03-12 9:15 ` Liu, Benjamin
2004-03-12 9:25 ` Liu, Benjamin
8 siblings, 0 replies; 10+ messages in thread
From: Keith Owens @ 2004-03-12 6:01 UTC (permalink / raw)
To: linux-ia64
On Thu, 11 Mar 2004 21:42:04 -0800,
"H. J. Lu" <hjl@lucon.org> wrote:
>which means it will be discarded if the driver is builtin. If
>xxx_remove may be discarded, please make sure there is
>
>#ifdef MODULE
> remove: xxx_remove,
>#endif
>
>so that xxx_remove won't be included when the driver is builtin.
remove: __devexit_p(xxx_remove),
is the correct method. The pointer is required for CONFIG_MODULE
_or_ CONFIG_HOTPLUG, otherwise it must be set to NULL. __devexit_p()
does all that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (6 preceding siblings ...)
2004-03-12 6:01 ` Keith Owens
@ 2004-03-12 9:15 ` Liu, Benjamin
2004-03-12 9:25 ` Liu, Benjamin
8 siblings, 0 replies; 10+ messages in thread
From: Liu, Benjamin @ 2004-03-12 9:15 UTC (permalink / raw)
To: linux-ia64
Yes, I agree.
Thanks,
Pingping (Benjamin) Liu
Intel China Software Center
>-----Original Message-----
>From: Keith Owens [mailto:kaos@ocs.com.au]
>Sent: 2004Äê3ÔÂ12ÈÕ 14:01
>To: H. J. Lu
>Cc: Liu, Benjamin; Chen, Kenneth W; Sourav Sen;
>linux-ia64@vger.kernel.org
>Subject: Re: 2.6.3 compilation problem
>
>
>On Thu, 11 Mar 2004 21:42:04 -0800,
>"H. J. Lu" <hjl@lucon.org> wrote:
>>which means it will be discarded if the driver is builtin. If
>>xxx_remove may be discarded, please make sure there is
>>
>>#ifdef MODULE
>> remove: xxx_remove,
>>#endif
>>
>>so that xxx_remove won't be included when the driver is builtin.
>
> remove: __devexit_p(xxx_remove),
>
>is the correct method. The pointer is required for CONFIG_MODULE
>_or_ CONFIG_HOTPLUG, otherwise it must be set to NULL. __devexit_p()
>does all that.
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: 2.6.3 compilation problem
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
` (7 preceding siblings ...)
2004-03-12 9:15 ` Liu, Benjamin
@ 2004-03-12 9:25 ` Liu, Benjamin
8 siblings, 0 replies; 10+ messages in thread
From: Liu, Benjamin @ 2004-03-12 9:25 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 2917 bytes --]
The linker's error report is kind of misleading in this case, there is no discarded reference from serio_close/serio_init.
To workaround the problem, we can reserve "exit.text" into final vmlinux image, which will enlarge the image size a little bit. I've attached the patch.
Another way is to upgrade binutils package, newer linker will report warning instead of error for this case.
Thanks,
Pingping (Benjamin) Liu
Intel China Software Center
>-----Original Message-----
>From: linux-ia64-owner@vger.kernel.org
>[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Liu, Benjamin
>Sent: 2004年3月11日 16:33
>To: Sourav Sen; linux-ia64@vger.kernel.org
>Subject: RE: 2.6.3 compilation problem
>
>
>To workaround the problem, you can append
>__attribute__((weak)) to the declaration of those discarded
>symbols defined in section ".exit.text".
>
>Another workaround is to keep section ".exit.text" by
>modifying arch/ia64/vmlinux.lds.S.
>
>The device driver author might be able to answer why it is
>written that way.
>
>Thanks,
>Pingping (Benjamin) Liu
>Intel China Software Center
>
>
>>-----Original Message-----
>>From: linux-ia64-owner@vger.kernel.org
>>[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Sourav Sen
>>Sent: 2004年3月11日 14:53
>>To: linux-ia64@vger.kernel.org
>>Subject: 2.6.3 compilation problem
>>
>>
>>Hi,
>>
>>While compiling Linux 2.6.3 + ia64 patch for it, using
>>the following:
>>
>>[sourav]$ gcc --version
>>gcc (GCC) 3.1
>>[sourav]$ as --version
>>GNU assembler 2.13.90 20030125
>>[sourav]$ ld --version
>>GNU ld version 2.12.90 20020604
>>
>>I get the following error while doing
>>make vmlinux
>>
>>------
>>[...]
>> IKCFG kernel/config_data.h
>> CC kernel/configs.o
>> LD kernel/built-in.o
>> GEN .version
>> CHK include/linux/compile.h
>>dnsdomainname: Host name lookup failure
>> UPD include/linux/compile.h
>> CC init/version.o
>> LD init/built-in.o
>> LD .tmp_vmlinux1
>>drivers/built-in.o: In function `serio_close':
>>drivers/built-in.o(.text+0x130c02): undefined reference to
>>`local symbols in
>>discarded section .exit.text'
>>drivers/built-in.o: In function `serio_init':
>>drivers/built-in.o(.init.text+0x10502): undefined reference to `local
>>symbols in discarded section .exit.text'
>>make: *** [.tmp_vmlinux1] Error 1
>>[...]
>>--------
>>
>>Any idea what I am doing wrong?
>>
>>TIA
>>--Sourav
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe
>>linux-ia64" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-ia64" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: text.exit.patch --]
[-- Type: application/octet-stream, Size: 447 bytes --]
--- arch/ia64/kernel/vmlinux.lds.S.old 2004-03-12 15:41:24.000000000 +0800
+++ arch/ia64/kernel/vmlinux.lds.S 2004-03-12 15:41:58.000000000 +0800
@@ -16,7 +16,6 @@
{
/* Sections to be discarded */
/DISCARD/ : {
- *(.exit.text)
*(.exit.data)
*(.exitcall.exit)
*(.IA_64.unwind.exit.text)
@@ -36,6 +35,7 @@
*(.text.ivt)
*(.text)
*(.gnu.linkonce.t*)
+ *(.exit.text)
}
.text2 : AT(ADDR(.text2) - LOAD_OFFSET)
{ *(.text2) }
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-03-12 9:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 6:55 2.6.3 compilation problem Sourav Sen
2004-03-11 6:57 ` Zhang, Yanmin
2004-03-11 8:32 ` Liu, Benjamin
2004-03-11 18:37 ` Kenneth Chen
2004-03-12 3:52 ` Liu, Benjamin
2004-03-12 5:42 ` H. J. Lu
2004-03-12 5:54 ` Chen, Kenneth W
2004-03-12 6:01 ` Keith Owens
2004-03-12 9:15 ` Liu, Benjamin
2004-03-12 9:25 ` Liu, Benjamin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox