Re: [arm-gnu] arm-none-gnueabi can't divide with -Os? (undefined reference to `__aeabi_uidiv')
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] arm-none-gnueabi can't divide with -Os? (undefined reference to `__aeabi_uidiv')



On Tuesday 02 March 2010 03:00:50 am Maxim Kuvyrkov wrote:
> We always recommend using the GCC driver to link the programs.  That way
> the driver can select the correct libraries for the CPU you building an
> application for.  E.g., the link command may look approximately
> $ arm-none-eabi-gcc -g -mcpu=arm7tdmi -T rom.ld -Wl,-Map=foo.map
> -Wl,--cref -o foo <objects>
> (you can pass linker-specific options using the `-Wl' prefix).

This worked perfectly.  I found I had to add all kinds of additional sections 
to my linker script, but it built without error using -Os and -mthumb -mthumb-
interwork:

        prog : {

/* I had to add these six sections */
                *(.init)
                *(.fini)
                *(.eh_frame)
                *(.init_array)
                *(.fini_array)
                *(.jcr)

                *(.text)
                *(.rodata)
                *(.rodata*)
                *(.glue_7)
                *(.glue_7t)
        } >flash

They don't appear to add very much to the resultant image though, so I'm not 
terribly concerned.  Is there a better place to put them, or will anywhere in 
flash work?

Thank you again for the help, It's very much appreciated!

-A.