fix-alignment-change-gcc-5.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From: Sylvain Gault <sylvain.gault at gmail.com>
  2. The section aligment specified in the ld scripts have to be greater or
  3. equal to those in the .o files generated by gcc.
  4. Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
  5. ---
  6. core/i386/syslinux.ld | 6 +++---
  7. core/x86_64/syslinux.ld | 6 +++---
  8. 2 files changed, 6 insertions(+), 6 deletions(-)
  9. diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld
  10. index 7b4e012..7390451 100644
  11. --- a/core/i386/syslinux.ld
  12. +++ b/core/i386/syslinux.ld
  13. @@ -266,7 +266,7 @@ SECTIONS
  14. __text_end = .;
  15. }
  16. - . = ALIGN(16);
  17. + . = ALIGN(32);
  18. __rodata_vma = .;
  19. __rodata_lma = __rodata_vma + __text_lma - __text_vma;
  20. @@ -361,7 +361,7 @@ SECTIONS
  21. __dynamic_end = .;
  22. }
  23. - . = ALIGN(16);
  24. + . = ALIGN(32);
  25. __data_vma = .;
  26. __data_lma = __data_vma + __text_lma - __text_vma;
  27. @@ -377,7 +377,7 @@ SECTIONS
  28. __pm_code_dwords = (__pm_code_len + 3) >> 2;
  29. . = ALIGN(128);
  30. -
  31. +
  32. __bss_vma = .;
  33. __bss_lma = .; /* Dummy */
  34. .bss (NOLOAD) : AT (__bss_lma) {
  35. diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld
  36. index 1057112..bf815c4 100644
  37. --- a/core/x86_64/syslinux.ld
  38. +++ b/core/x86_64/syslinux.ld
  39. @@ -266,7 +266,7 @@ SECTIONS
  40. __text_end = .;
  41. }
  42. - . = ALIGN(16);
  43. + . = ALIGN(32);
  44. __rodata_vma = .;
  45. __rodata_lma = __rodata_vma + __text_lma - __text_vma;
  46. @@ -361,7 +361,7 @@ SECTIONS
  47. __dynamic_end = .;
  48. }
  49. - . = ALIGN(16);
  50. + . = ALIGN(32);
  51. __data_vma = .;
  52. __data_lma = __data_vma + __text_lma - __text_vma;
  53. @@ -377,7 +377,7 @@ SECTIONS
  54. __pm_code_dwords = (__pm_code_len + 3) >> 2;
  55. . = ALIGN(128);
  56. -
  57. +
  58. __bss_vma = .;
  59. __bss_lma = .; /* Dummy */
  60. .bss (NOLOAD) : AT (__bss_lma) {
  61. --
  62. 2.5.3