Skip to content

Commit

Permalink
umip: fix "multiple definition" compilation issue
Browse files Browse the repository at this point in the history
Fix "multiple definition" compilation issue found in GCC 11.4.1:
cc -no-pie -o umip_test_basic_64 umip_utils_64.o umip_test_basic.c
/usr/bin/ld: /tmp/ccXWxfby.o:(.bss+0xc): multiple definition of `got_signal'; umip_utils_64.o:(.bss+0x8): first defined here
/usr/bin/ld: /tmp/ccXWxfby.o:(.bss+0x10): multiple definition of `got_sigcode'; umip_utils_64.o:(.bss+0xc): first defined here
collect2: error: ld returned 1 exit status

Signed-off-by: Pengfei Xu <[email protected]>
  • Loading branch information
xupengfe authored and ysun committed May 11, 2024
1 parent 3988b78 commit 3236fff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BM/umip/umip_test_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#endif

int test_passed, test_failed, test_errors;
sig_atomic_t got_signal, got_sigcode;
extern sig_atomic_t got_signal, got_sigcode;

static void call_sgdt(void)
{
Expand Down

0 comments on commit 3236fff

Please sign in to comment.