commit 87a08258d9a6d83899b8aa71444e7cb8024eb685 parent 3c89fadf61506132b3ebbc620b6dadf4e4c71af6 Author: Louis Burda <quent.burda@gmail.com> Date: Sun, 13 Feb 2022 10:54:36 +0100 Add version script for tracking abi changes Diffstat:
M | Makefile | | | 5 | ++--- |
R | liblist.abi -> liblist.api | | | 0 | |
A | liblist.lds | | | 18 | ++++++++++++++++++ |
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile @@ -30,12 +30,11 @@ include $(DEPS) build/liblist.a: $(OBJS) | build $(CC) -o build/tmp.o $(OBJS) $(CFLAGS) -r - objcopy --keep-global-symbols=liblist.abi build/tmp.o build/fixed.o + objcopy --keep-global-symbols=liblist.api build/tmp.o build/fixed.o ar rcs $@ build/fixed.o build/liblist.so: $(PI_OBJS) | build - $(CC) -o build/tmp.so $(PI_OBJS) $(CFLAGS) -shared - objcopy --keep-global-symbols=liblist.abi build/tmp.so $@ + $(CC) -o $@ $(PI_OBJS) $(CFLAGS) -shared -Wl,-version-script liblist.lds build/test: src/test.c build/liblist.a | build $(CC) -o $@ $^ -I include diff --git a/liblist.abi b/liblist.api diff --git a/liblist.lds b/liblist.lds @@ -0,0 +1,18 @@ +LIBLIST_1.0 { + global: + list_init; + list_free; + list_empty; + list_len; + list_at; + list_push_front; + list_push_back; + list_pop_front; + list_pop_back; + link_iter; + link_pop; + link_prepend; + link_append; + local: + *; +};