elf2flt.nios2.conditional 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- elf2flt/elf2flt.ld
  2. +++ elf2flt/elf2flt.ld
  3. @@ -63,12 +63,16 @@
  4. *(.eh_frame)
  5. *(.gcc_except_table)
  6. + /* nios2 need gp */
  7. + _gp = ABSOLUTE(ALIGN(16) + 0x7ff0);
  8. + PROVIDE(gp = _gp);
  9. +
  10. /* Microblaze has .sdata and .sbss (small bss). They must
  11. be contiguous, so please don't move any of this. JW */
  12. _ssrw = . ;
  13. *(.sdata)
  14. *(.sdata.*)
  15. - *(.sbss) /* Don't move this! */
  16. + *(.sbss .gnu.linkonce.sb*) /* Don't move this! */
  17. _essrw = . ;
  18. _ssrw_size = _essrw - _ssrw;
  19. @@ -176,4 +180,6 @@
  20. .debug_line 0 : { *(.debug_line) }
  21. .debug_pubnames 0 : { *(.debug_pubnames) }
  22. .debug_aranges 0 : { *(.debug_aranges) }
  23. + .debug_frame 0 : { *(.debug_frame) }
  24. + .debug_str 0 : { *(.debug_str) }
  25. }
  26. --- elf2flt/ld-elf2flt.in
  27. +++ elf2flt/ld-elf2flt.in
  28. @@ -132,7 +132,7 @@
  29. esac
  30. ARG1="$ARG1 -defsym $GOT_OFFSET=`expr ${SHARED_ID} '*' -4 - 4`"
  31. fi
  32. - if [ "@emit_relocs@" = "yes" ]
  33. + if [ "no" = "yes" ]
  34. then
  35. SEDOP="$SEDOP -e s/^SINGLE_LINK://"
  36. else
  37. @@ -155,7 +155,7 @@
  38. LDSCRIPT="$NEWLDSCRIPT"
  39. fi
  40. - if [ "@emit_relocs@" = "yes" ]
  41. + if [ "no" = "yes" ]
  42. then
  43. $LINKER $EMUL $SDIRS -T $LDSCRIPT -q -o "$OFILE.gdb" $ARG1 ||exit $?
  44. RFILE="$OFILE.gdb"