mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 03:53:33 +00:00
f8b9bd2b47
Things are a little better. The LLD that comes with Linux seems to work. Old versions like LLVM 8 haven't been supported since Cosmopolitan v0.2. Running Clang on Windows with --target=x86_64-pc-linux-gnu doesn't seem to work. It has something to do with the recently added .zip section in the linker script. But even if that's removed, LLD on Windows thinks it is building an EFI application for some reason. Linker scripts are such a brittle house of cards, even for just ld.bfd alone.. We should just find a way to run our one true musl-cross-make linux gcc toolchain under Blinkenlights on non-Linux because GCC and Clang are so nondeterministic, inconsistent, and unreproducible when built for other operating systems. We need an actually portable compiler/linker that'll always behave the same way no matter what. See #180
28 lines
2 KiB
ArmAsm
28 lines
2 KiB
ArmAsm
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
|
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
|
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
│ │
|
|
│ Permission to use, copy, modify, and/or distribute this software for │
|
|
│ any purpose with or without fee is hereby granted, provided that the │
|
|
│ above copyright notice and this permission notice appear in all copies. │
|
|
│ │
|
|
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
|
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
|
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
|
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
|
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
|
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
|
#include "libc/macros.internal.h"
|
|
.real
|
|
.source __FILE__
|
|
.code16 # ∩ .code32 ∩ .code64
|
|
|
|
// Function Profiling Hook.
|
|
// cc -pg adds this to the start of global functions.
|
|
mcount: ret
|
|
.endfn mcount,weak
|
|
.alias mcount,.mcount # freebsd weirdness?
|