gcc-fix-alignment.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From e5f2b577ded109291c9632dacb6eaa621d8a59fe Mon Sep 17 00:00:00 2001
  2. From: Sylvain Gault <sylvain.gault@gmail.com>
  3. Date: Tue, 29 Sep 2015 02:38:25 +0200
  4. Subject: [PATCH 1/1] bios: Fix alignment change with gcc 5
  5. The section aligment specified in the ld scripts have to be greater or
  6. equal to those in the .o files generated by gcc.
  7. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
  8. Tested-by: poma <pomidorabelisima@gmail.com>
  9. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
  10. ---
  11. core/i386/syslinux.ld | 6 +++---
  12. core/x86_64/syslinux.ld | 6 +++---
  13. 2 files changed, 6 insertions(+), 6 deletions(-)
  14. diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld
  15. index 7b4e012..7390451 100644
  16. --- a/core/i386/syslinux.ld
  17. +++ b/core/i386/syslinux.ld
  18. @@ -266,7 +266,7 @@ SECTIONS
  19. __text_end = .;
  20. }
  21. - . = ALIGN(16);
  22. + . = ALIGN(32);
  23. __rodata_vma = .;
  24. __rodata_lma = __rodata_vma + __text_lma - __text_vma;
  25. @@ -361,7 +361,7 @@ SECTIONS
  26. __dynamic_end = .;
  27. }
  28. - . = ALIGN(16);
  29. + . = ALIGN(32);
  30. __data_vma = .;
  31. __data_lma = __data_vma + __text_lma - __text_vma;
  32. @@ -377,7 +377,7 @@ SECTIONS
  33. __pm_code_dwords = (__pm_code_len + 3) >> 2;
  34. . = ALIGN(128);
  35. -
  36. +
  37. __bss_vma = .;
  38. __bss_lma = .; /* Dummy */
  39. .bss (NOLOAD) : AT (__bss_lma) {
  40. diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld
  41. index 1057112..bf815c4 100644
  42. --- a/core/x86_64/syslinux.ld
  43. +++ b/core/x86_64/syslinux.ld
  44. @@ -266,7 +266,7 @@ SECTIONS
  45. __text_end = .;
  46. }
  47. - . = ALIGN(16);
  48. + . = ALIGN(32);
  49. __rodata_vma = .;
  50. __rodata_lma = __rodata_vma + __text_lma - __text_vma;
  51. @@ -361,7 +361,7 @@ SECTIONS
  52. __dynamic_end = .;
  53. }
  54. - . = ALIGN(16);
  55. + . = ALIGN(32);
  56. __data_vma = .;
  57. __data_lma = __data_vma + __text_lma - __text_vma;
  58. @@ -377,7 +377,7 @@ SECTIONS
  59. __pm_code_dwords = (__pm_code_len + 3) >> 2;
  60. . = ALIGN(128);
  61. -
  62. +
  63. __bss_vma = .;
  64. __bss_lma = .; /* Dummy */
  65. .bss (NOLOAD) : AT (__bss_lma) {
  66. --
  67. 2.5.5.GIT