Hi everybody,
 I want to import in a project, the absolute path of a Library from another project.
 For example, 
I have a boot and a jump to an app. if I use printf in my boot, 
I want to use the same allocation of the function printf in my app. 
I Don't know with gcc/ld, how to export/import symbols 
Thanks, 
Benoit
 
					
				
		
 Alice_Yang
		
			Alice_Yang
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Benoit Ruelland,
Do you just use the GCC compiler or a IDE based on GCC?
Hello,
I'm using mcuExpresso.
Suggest you read this article
How to use Custom Library Names with GNU Linker and Eclipse | MCU on Eclipse
Thanks Con Verse.
What I want to do is access to absolute address of function into Library in another project.
Call the function in your application and link with the library containing that function. That is all you need to do.
Thanks Con Verse.
a Library contain relative address for functions.
I want to access absolute address after linker process.
for illustrate, I just create a lib calculate with 2 functions 
int calc_add(int a,int b)
int calc_sub(int a,int b)
In my first project I call lib_sub => linker give me this address :
 .text.calc_sub
                0x1a001bdc       0x1c C:\(somewhere in my computer)\Calculate\Debug\libCalculate.a(calc.o)
                0x1a001bdc                calc_sub
I do the same with my second project => linker give me this address :
.text.calc_sub
                0x1a000f80       0x1c C:\(somewhere in my computer)\Calculate\Debug\libCalculate.a(calc.o)
                0x1a000f80                calc_sub
You can see that the location of the function are not the same.
What I want to do, export symbol of my first project (Absolute address)
and import it in my second project.
For illustrate:
first project :
 .text.calc_sub
                0x1a001bdc       0x1c C:\(somewhere in my computer)\Calculate\Debug\libCalculate.a(calc.o)
                0x1a001bdc      calc_sub
second project :
.text.calc_sub
                0x1a001bdc       0x1c C:\(somewhere in my computer)\Calculate\Debug\libCalculate.a(calc.o)
                0x1a001bdc      calc_sub
Thanks for help.
Sorry, I have no idea how to do that - or even if it is possible (but it doesn't sound like a good idea).
A better way of achieving a similar outcome would be to put 'jump' table at a fixed, known location in your 1st application and then direct your call through the table in your 2nd application.
