[Top][All Lists]

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

[avr-gcc-list] Linking order

From: Daniel Williamson
Subject: [avr-gcc-list] Linking order
Date: Thu, 6 Mar 2003 11:06:09 -0000

Hi all,

I've recently found that changing the linking order of my program makes the
difference between it working or not.
Also I've found that one line of unrelated code in a seperate source file
can affect the program. i.e. it's the compiled size that seems to affect the
program operation?

I'm using the current version of winavr on a mega 128 with the following

# Compiler flags.
= -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -W
all -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)

# Assembler flags.
    ASFLAGS = -Wa,-ahlms=$(<:.s=.lst), -gstabs

# Linker flags (passed via GCC).
        LDFLAGS = -Wl,-Map=$(TARGET).map,--cref

# Additional library flags (-lm = math library).
        LIBFLAGS = -lm

I was wondering if function calls, or lookup tables, or maybe case
statements was causing it?
but i cont have mshort-calls set.

I've checked that my lookup tables that are stored using PROGMEM are always
at the same memory locations no matter what the linking order is, and so I'm
thinking its something to do with function calls or case statements.

Does anyone have any advice to offer?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]