Some versions of binutils have curious concepts of what constitutes subtraction. For example: 0x00000000000000f0 _text16_late = . 0x0000000000000898 _mtext16 = . 0x0000000000000898 _etext16 = . 0x0000000000000898 _text16_late_filesz = ABSOLUTE ((_mtext16 - _text16_late)) 0x00000000000007a8 _text16_late_memsz = ABSOLUTE ((_etext16 - _text16_late)) This has interesting side-effects such as producing sizes for .bss segments that are negative, causing the majority of addressable memory to be zeroed out. Fix by using the form ABSOLUTE ( x ) - ABSOLUTE ( y ) rather than ABSOLUTE ( x - y ) Reported-by: H. Peter Anvin <hpa@zytor.com> Suggested-by: H. Peter Anvin <hpa@zytor.com> Tested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
39 |
|
39 |
|
40 |
|
40 |
|
41 |
|
41 |
|
42 |
|
|
|
43 |
|
|
|
|
42 |
|
|
|
43 |
|
|
44 |
|
44 |
|
45 |
|
45 |
|
46 |
|
46 |
|
|
|
||
63 |
|
63 |
|
64 |
|
64 |
|
65 |
|
65 |
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
71 |
|
71 |
|
72 |
|
72 |
|
73 |
|
73 |
|
|
|
||
89 |
|
89 |
|
90 |
|
90 |
|
91 |
|
91 |
|
92 |
|
|
|
93 |
|
|
|
|
92 |
|
|
|
93 |
|
|
94 |
|
94 |
|
95 |
|
95 |
|
96 |
|
96 |
|
|
|
||
118 |
|
118 |
|
119 |
|
119 |
|
120 |
|
120 |
|
121 |
|
|
|
122 |
|
|
|
|
121 |
|
|
|
122 |
|
|
123 |
|
123 |
|
124 |
|
124 |
|
125 |
|
125 |
|
|
|
||
134 |
|
134 |
|
135 |
|
135 |
|
136 |
|
136 |
|
137 |
|
|
|
138 |
|
|
|
|
137 |
|
|
|
138 |
|
|
139 |
|
139 |
|
140 |
|
140 |
|
141 |
|
141 |
|