[libc-commits] [libc] [libc] major refactor of startup library (PR #76092)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Thu Dec 21 08:02:20 PST 2023


================
@@ -0,0 +1,141 @@
+//===-- Implementation file of do_start -----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+#include "startup/linux/do_start.h"
+#include "src/__support/OSUtil/syscall.h"
+#include "src/__support/threads/thread.h"
+#include "src/stdlib/atexit.h"
+#include "src/stdlib/exit.h"
+#include "src/unistd/environ.h"
+
+#include <linux/auxvec.h>
+#include <linux/elf.h>
+#include <stdint.h>
+#include <sys/mman.h>
+#include <sys/syscall.h>
+
+namespace LIBC_NAMESPACE {
+
+// TODO: this symbol will be moved to config.linux.app
+AppProperties app;
+
+using InitCallback = void(int, char **, char **);
+using FiniCallback = void(void);
+
+extern "C" int main(int argc, char **argv, char **envp);
----------------
SchrodingerZhu wrote:

updated

https://github.com/llvm/llvm-project/pull/76092


More information about the libc-commits mailing list