Re: undefined reference to __aeabi_unwind_cpp_pr1, __cxa_end_cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Ian,

Removing the -nostdlibs and -nodefaultfiles and adding the following
sections to the linker script fixed the undefined symbols and multiple
declaration of _start issues.

        .data : { *(.data) }
        __exidx_start = .;
        .ARM.exidx   : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
        __exidx_end = .;

I'm left with the assertion failures:
$ /tools/.../arm-none-linux-gnueabi-g++ -static -nostartfiles -T
temp.ld -o output_program start.o abc.o xyz.o
/tools/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
BFD (Sourcery G++ Lite 2008q3-41) 2.18.50.20080215 as
sertion fail /scratch/../linux/obj/binutils-src-2008q3-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf.c:3916
/tools/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
BFD (Sourcery G++ Lite 2008q3-41) 2.18.50.20080215 as
sertion fail /scratch/../linux/obj/binutils-src-2008q3-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf.c:3916

JJ



On Mon, Oct 26, 2009 at 1:05 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> JJ <alchemistmba@xxxxxxxxx> writes:
>
>> unwind-arm.c:(.text+0x72c): undefined reference to `__exidx_end'
>> unwind-arm.c:(.text+0x730): undefined reference to `__exidx_start'
>
> These and the other undefined symbols are intended to be defined by
> the linker script.  run ...-ld --verbose to see the default linker
> script, and incorporate that stuff into your linker script.
>
>
>> I also want to rewrite the "_start" function in assembly. If I add
>> this file in, g++ complains that _start is defined twice. Is there a
>> way to do this?
>
> You'll need to use -nostartfiles and figure out what you need to
> replace everything other than _start.
>
> Or I suppose you could use ENTRY in your linker script to start your
> program at something other than _start.
>
> Ian
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux