Commit aed33c73 authored by PoroCYon's avatar PoroCYon Committed by PoroCYon
Browse files

make things smaller again

parent 434630e6
......@@ -11,7 +11,7 @@ BITS ?= $(shell getconf LONG_BIT)
# -ffast-math -funsafe-math-optimizations -fno-stack-protector -fomit-frame-pointer \
# -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
COPTFLAGS=-O2 -fno-plt -fno-stack-protector -fno-stack-check -fno-unwind-tables \
COPTFLAGS=-Os -fno-plt -fno-stack-protector -fno-stack-check -fno-unwind-tables \
-fno-asynchronous-unwind-tables -fomit-frame-pointer -ffast-math -no-pie \
-fno-pic -fno-PIE -m64 -march=core2 -ffunction-sections -fdata-sections
CXXOPTFLAGS=$(COPTFLAGS) -fno-exceptions \
......@@ -40,7 +40,7 @@ CXXFLAGS += -m$(BITS) $(shell pkg-config --cflags sdl2)
LIBS=-lc
ASFLAGS += -DUSE_INTERP -DALIGN_STACK #-DUSE_DT_DEBUG #-DNO_START_ARG
ASFLAGS += -DUSE_INTERP -DALIGN_STACK -DNO_START_ARG #-DUSE_DT_DEBUG
NASM ?= nasm
PYTHON3 ?= python3
......
......@@ -27,7 +27,7 @@ int _start(void* stack) {
"push %%rcx\n"
"pop %%r8\n"
"pop %%r9\n"
"call *__libc_start_main@GOTPCREL(%%rip)\n"
"jmp *__libc_start_main@GOTPCREL(%%rip)\n"
:
:"S"(argc), "D" (main), "d" (argv)
:);
......
#include <stdlib.h>
#include <stdio.h>
const char *f = "foo";
__attribute__((__section__(".rodata.hello-_start$f")))
const static char *f = "foo";
__attribute__((__externally_visible__, __section__(".text.startup._start"),
__noreturn__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment