Problem with linking static lib text into specific section

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

 



Hi I have the following in my linker script:

I'm forcing to link the text and the rodata from libMy-Cli.a into a
specific section.
Now I have additional file libMy-GUI.a that I also want to link in similar way.
But It fails I get linking error that some addresses are out of the memory.
Is there more elegant way to what i'm trying to achieve?



#define SECTION_text(_region_, _vma_, _lma_)   \
  .text _vma_ : _lma_                          \
    {                                                \
      _stext = .; _ftext = . ;                 \
      *(EXCLUDE_FILE (*libMy-Cli.a) .text)   \
      *(EXCLUDE_FILE (*libMy-Cli.a) .text.*) \
      *(.stub)                                     \
      *(.gnu.warning)                          \
      *(.gnu.linkonce.t*)                      \
      *(.mips16.fn.*) *(.mips16.call.*)   \
    } > _region_ =0                            \
  _etext = .; PROVIDE (etext = .);

#define SECTION_rodata(_region_, _vma_, _lma_)        \
  .rodata _vma_ : _lma_                               \
    {                                                             \
      FORCE_OUTPUT;                                 \
      *(EXCLUDE_FILE (*libMy-Cli.a) .rodata)   \
      *(EXCLUDE_FILE (*libMy-Cli.a) .rodata.*) \
      *(.gnu.linkonce.r*)                                    \
    } > _region_

#define SECTION_statLib_text(_region_, _vma_, _lma_)     \
	.statLib_text _vma_ : _lma_               	  	    \
    {                                                           \
    	FORCE_OUTPUT;                             \
    	KEEP(*( SORT (.my.cli.table.*)));		\
    	libMy-Cli.a (.text)                	        \
      	libMy-Cli.a *(.text.*)              	        \
      	libMy-Cli.a (.rodata)              	        \
        libMy-Cli.a *(.rodata.*)				\
    } > _region_ 	


Thanks

Elad


[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