Skip to content

Commit

Permalink
linux/bfd: allow un-strict function conversion with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Oct 2, 2023
1 parent c0522ed commit ad389c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ COMPILER = $(shell $(CC) -v 2>&1 | \
ifeq ($(COMPILER),clang)
ARCH_CFLAGS += -Wno-initializer-overrides -Wno-unknown-warning-option
ARCH_CFLAGS += -Wno-gnu-empty-initializer -Wno-format-pedantic
ARCH_CFLAGS += -Wno-gnu-statement-expression
ARCH_CFLAGS += -Wno-gnu-statement-expression -Wno-cast-function-type-strict
ARCH_CFLAGS += -mllvm -inline-threshold=2000
CFLAGS_BLOCKS = -fblocks

Expand Down
1 change: 1 addition & 0 deletions linux/bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) {
* of 3. Add the 4th argument in all cases. Hopefully it'll work will all ABIs, and the 4th
* argument will be discarded if needed.
*/

void (*idi_4_args)(void*, void*, void*, void*) =
(void (*)(void*, void*, void*, void*))init_disassemble_info;
idi_4_args(&info, instr, arch_bfdFPrintF, arch_bfdFPrintFStyled);
Expand Down

0 comments on commit ad389c4

Please sign in to comment.