|
@@ -19,7 +19,16 @@ while (<>) {
|
|
|
if ($file_offset == 0) {
|
|
|
$file_offset = $offset;
|
|
|
} elsif ($file_offset != $offset) {
|
|
|
- die ".bss and .brk lack common file offset\n";
|
|
|
+ # BFD linker shows the same file offset in ELF.
|
|
|
+ # Gold linker shows them as consecutive.
|
|
|
+ next if ($file_offset + $mem_size == $offset + $size);
|
|
|
+
|
|
|
+ printf STDERR "file_offset: 0x%lx\n", $file_offset;
|
|
|
+ printf STDERR "mem_size: 0x%lx\n", $mem_size;
|
|
|
+ printf STDERR "offset: 0x%lx\n", $offset;
|
|
|
+ printf STDERR "size: 0x%lx\n", $size;
|
|
|
+
|
|
|
+ die ".bss and .brk are non-contiguous\n";
|
|
|
}
|
|
|
}
|
|
|
}
|