Skip to content

Commit

Permalink
Fix linking breakage for rv_histogram
Browse files Browse the repository at this point in the history
Since mpool is used in more places, it is necessary to link it; otherwise,
the following errors appear.

/usr/bin/ld: build/riscv.o: in function `block_map_clear':
riscv.c:(.text+0x68): undefined reference to `mpool_free'
/usr/bin/ld: riscv.c:(.text+0x7a): undefined reference to `mpool_free'
/usr/bin/ld: build/riscv.o: in function `rv_delete':
riscv.c:(.text+0x25d): undefined reference to `mpool_destroy'
/usr/bin/ld: riscv.c:(.text+0x269): undefined reference to `mpool_destroy'
/usr/bin/ld: build/riscv.o: in function `rv_create':
riscv.c:(.text+0x593): undefined reference to `mpool_create'
/usr/bin/ld: riscv.c:(.text+0x5aa): undefined reference to `mpool_create'
collect2: error: ld returned 1 exit status
  • Loading branch information
jserv committed Oct 11, 2023
1 parent 006794d commit e7d873d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mk/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ HIST_OBJS := \
map.o \
elf.o \
decode.o \
mpool.o \
rv_histogram.o

HIST_OBJS := $(addprefix $(OUT)/, $(HIST_OBJS))
Expand Down

0 comments on commit e7d873d

Please sign in to comment.