mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Introduce FreeBSD ARM64 support
It's 100% passing test fleet. Solid as a rock.
This commit is contained in:
parent
43fe5956ad
commit
83107f78ed
455 changed files with 778 additions and 551 deletions
|
@ -29,12 +29,12 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/stdckdint.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
|
@ -245,6 +245,10 @@ static void RewriteTlsCode(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void UseFreebsdOsAbi(void) {
|
||||
elf->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve GCC11 `-fpatchable-function-entry` codegen.
|
||||
*
|
||||
|
@ -391,6 +395,9 @@ static void FixupObject(void) {
|
|||
OptimizePatchableFunctionEntries();
|
||||
} else if (elf->e_machine == EM_AARCH64) {
|
||||
RewriteTlsCode();
|
||||
if (elf->e_type != ET_REL) {
|
||||
UseFreebsdOsAbi();
|
||||
}
|
||||
}
|
||||
if (elf->e_type != ET_REL) {
|
||||
RelinkZipFiles();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue