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