Using "ld --oformat binary" for mbr.bin and usbdisk.bin seems to cause segmentation faults on some versions of binutils (observed on Fedora 27). Work around this problem by using ld to create an intermediate ELF object, followed by objcopy (via the existing %.tmp -> %.bin rule) to create the final binary. Note that we cannot simply use a single-stage "objcopy -O binary" since this will not process the relocation records for x86_64: see commit 1afcccd ("[build] Do not use "objcopy -O binary" for objects with relocation records"). Reported-by: Brent S <bts@square-r00t.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
106 |
|
106 |
|
107 |
|
107 |
|
108 |
|
108 |
|
109 |
|
|
|
|
109 |
|
|
110 |
|
110 |
|
111 |
|
|
|
|
111 |
|
|
112 |
|
112 |
|
113 |
|
113 |
|
114 |
|
|
|
|
114 |
|
|
115 |
|
115 |
|
116 |
|
|
|
|
116 |
|
|
117 |
|
117 |
|
118 |
|
118 |
|
119 |
|
119 |
|
|
|
||
6 |
|
6 |
|
7 |
|
7 |
|
8 |
|
8 |
|
|
9 |
|
|
9 |
|
10 |
|
10 |
|
11 |
|
11 |
|
12 |
|