m1n1.ld: clang compat, define _base symbol inside SECTIONS for relative symbol resolution

Signed-off-by: Ferdinand Bachmann <theferdi265@gmail.com>
This commit is contained in:
Ferdinand Bachmann 2021-01-17 16:07:31 +01:00 committed by Hector Martin
parent 8511d9ff74
commit 505eb4ce4f

View file

@ -3,12 +3,10 @@ ENTRY(_start)
/* Fake virtual load address for the mach-o */
_va_base = 0xFFFFFE0007004000;
/* We are actually relocatable */
_base = 0;
_stack_size = 0x20000;
. = _base;
/* We are actually relocatable */
. = 0;
PHDRS
{
@ -19,6 +17,8 @@ PHDRS
}
SECTIONS {
_base = .;
.header : {
_mach_header = .;
/* mach-o header */