RE: 2.6.3 compilation problem

Liu, Benjamin
2004-03-12T09:25:03Z

[-- 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) }