From ab04f8876eef5e9da79573368d440da067293c2e Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 30 Mar 2025 01:46:26 +0100 Subject: ld: linker script example --- src/development/ld/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/development/ld/Makefile (limited to 'src/development/ld/Makefile') diff --git a/src/development/ld/Makefile b/src/development/ld/Makefile new file mode 100644 index 0000000..16869a8 --- /dev/null +++ b/src/development/ld/Makefile @@ -0,0 +1,15 @@ +show-mem: +show-nomem: +show-%: link-% + readelf -W -S -l $^ + nm $^ + objdump -d $^ + +link-%: link-%.ld data.o + ld -o $@ -T $^ + +%.o: %.S + gcc -c $^ + +clean: + $(RM) mem *.o -- cgit v1.2.3