[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] relocate .text.libgcc
From: |
Simon Han |
Subject: |
[avr-gcc-list] relocate .text.libgcc |
Date: |
Mon, 12 Jul 2004 00:31:09 -0700 (PDT) |
Dear AVR,
I know this question is probably really stupid, but I will ask
anyway. Is there a way to relocate .text.libgcc to a memory location I
define? For example,
*(.text.*)
.text.libgcc 0x0001e0da 0x18
/usr/local/lib/gcc-lib/avr/3.3-tinyos/avr5/libgcc.a(_udivmodqi4.o)
0x0001e0da __udivmodqi4
I need to move _udivmodqi4.o to location 0x0000
Ok. The thing I really need is the ability to generate binary for a
function with two parameters (2 pointers). So far, what I have done is to
mark such function as special section (.spec_func) using
__attribute__ ((section (".spec_func)));
link this function with a empty main(). Finally, use avr-objcopy to keep
.spec_func section and remove all other section. One problem on this
approach is that whenever I use internal gcc library such as
if (var_a % 5 == 0) do_something();
avr-gcc will allocate libgcc in .text and will be removed based on the
method above. Another problem is that this special function cannot have
its own private functions. The reason is that on atmega128, function call
will use "jmp" instead of "rjmp". When I relcoate the function image
during runtime, private functions will be at different location than "jmp"
destination.
Where should I start to solve this? ldscripts?
Thank you,
Simon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-gcc-list] relocate .text.libgcc,
Simon Han <=