Creating a Trampolines jump table

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since I don't relay know assembly language so I I adapted  someone code and i am trying to use. The codes adds an Boot_aux before the bootloader then it adds the trampoline in the .txt file but the problem the colmpiler compalines because it say that the line is overlapping with .data and .text how can i solve this issue

 


#BOOT_SECTION_LD_FLAG  = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2))


BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96)
BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable,   BootloaderAPI_JumpTable,   32)
BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  BootloaderAPI_Signatures,  8)

Here is the error 

 -Wl,--section-start=.text=0x7000
 -Wl,--section-start=.apitable_trampolines=0x7FA0 
 -Wl,--undefined=BootloaderAPI_Trampolines
 -Wl,--section-start=.apitable_jumptable=0x7FE0 
 -Wl,--undefined=BootloaderAPI_JumpTable
 -Wl,--section-start=.apitable_signatures=0x7FF8
 -Wl,--undefined=BootloaderAPI_Signatures -
 Wl,--relax -Wl,--gc-sections     
 -lm -Wl,--section-start=.boot_aux=0x6810
 -Wl,--section-start=.boot_aux_trampoline=0x6800 
 -Wl,--undefined=Boot_AUX_Trampoline
 
 section .apitable_trampolines loaded at [00007fa0,00007fb7] overlaps section .text loaded at [00007000,00007ff1]
 section .data loaded at [00007ff2,00008099] overlaps section .apitable_jumptable loaded at [00007fe0,00007ff7]
section .apitable_signatures loaded at [00007ff8,00007ffb] overlaps section .data loaded at [00007ff2,00008099]

 I know that the problem is using  "--undefined=" , but is there any work around it

Any suggestion ?