This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ld segfaults building kernel


Hi, I'm having trouble getting the Linux kernel to link properly when
compiled with -fasynchronous-unwind-tables for ARM (EABI).  The
ARM-Linux folks aren't familiar with this error, and suggested that I
post here.

Quick recap of the problem:

> I built a recent snapshot of binutils (9/13) and tried the build over
> again, and I now get the same error that Kevin described:
> 
> ...
>   LD      .tmp_vmlinux1
> arm-linux-gnueabi-ld: .tmp_vmlinux1: sh_link of section
> `.ARM.exidx.exit.text' points to discarded section `.exit.text' of
> `fs/built-in.o' arm-linux-gnueabi-ld: final link failed: Bad value
> make: *** [.tmp_vmlinux1] Error 1
> 
> FYI, if I modify vmlinux.lds to either not discard .exit.text, or to
> additionally discard .ARM.exidx.exit.text, the same [new]
> error results
> from both:
> 
> ...
>   LD      .tmp_vmlinux1
> init/built-in.o:(.ARM.exidx.init.text+0x0): undefined reference to
> `__aeabi_unwind_cpp_pr1' init/built-in.o:(.ARM.exidx.init.text+0x68):
> undefined reference to `__aeabi_unwind_cpp_pr1'
> init/built-in.o:(.ARM.exidx.init.text+0xb8): undefined reference to
> `__aeabi_unwind_cpp_pr1'
> init/built-in.o:(.ARM.exidx.init.text+0x160): undefined reference to
> `__aeabi_unwind_cpp_pr1' init/built-in.o:(.ARM.exidx+0x0): undefined
> reference to `__aeabi_unwind_cpp_pr1'
> init/built-in.o:(.ARM.exidx+0x18): more undefined references to
> `__aeabi_unwind_cpp_pr1' follow   
> make: *** [.tmp_vmlinux1] Error 1

I'm not sure how to attack this - the first error seems to maybe be
corrected by a modification of the link script, but I can't get the
second error to go away.  I've tried adding "-lgcc_eh -L/path/to/libgcc"
to the ld command-line, but it doesn't help.  Any suggestions?

Thanks

-- 
Matthew L. Creech


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]