Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmicrokit: fix to successfully link on LLD #62

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,6 @@ def build_lib_component(
# Make output read-only
dest.chmod(0o444)

crt0 = build_dir / "crt0.o"
dest = lib_dir / "crt0.o"
dest.unlink(missing_ok=True)
copy(crt0, dest)
# Make output read-only
dest.chmod(0o444)

include_dir = root_dir / "board" / board.name / config.name / "include"
source_dir = Path(component_name) / "include"
for p in source_dir.rglob("*"):
Expand Down
5 changes: 2 additions & 3 deletions libmicrokit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ TOOLCHAIN := aarch64-none-elf-
CFLAGS := -std=gnu11 -g3 -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -Wall -Wno-maybe-uninitialized -Wno-unused-function -Werror -Iinclude -I$(SEL4_SDK)/include

LIBS := libmicrokit.a
OBJS := main.o dbg.o
OTHER_OBJS := crt0.o
OBJS := main.o crt0.o dbg.o

$(BUILD_DIR)/%.o : src/%.S
$(TOOLCHAIN)gcc -x assembler-with-cpp -c -g3 -mcpu=$(GCC_CPU) $< -o $@
Expand All @@ -29,7 +28,7 @@ $(BUILD_DIR)/%.o : src/%.c

LIB = $(addprefix $(BUILD_DIR)/, $(LIBS))

all: $(LIB) $(addprefix $(BUILD_DIR)/, $(OTHER_OBJS))
all: $(LIB)

$(LIB): $(addprefix $(BUILD_DIR)/, $(OBJS))
$(TOOLCHAIN)ar -rv $@ $^
2 changes: 0 additions & 2 deletions libmicrokit/microkit.ld
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ PHDRS

ENTRY(_start);

STARTUP(crt0.o);

SECTIONS
{
. = 0x200000;
Expand Down