make things smaller again

This commit is contained in:
PoroCYon 2019-03-06 17:53:02 +01:00 committed by PoroCYon
parent 434630e6cc
commit aed33c73a9
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)
:);

View File

@ -1,7 +1,8 @@
#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__