projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31332cc
)
libbpf: Fix ELF symbol visibility update logic
author
Andrii Nakryiko
<andrii@kernel.org>
Fri, 7 May 2021 05:41:17 +0000
(22:41 -0700)
committer
Alexei Starovoitov
<ast@kernel.org>
Tue, 11 May 2021 22:07:17 +0000
(15:07 -0700)
Fix silly bug in updating ELF symbol's visibility.
Fixes:
a46349227cd8
("libbpf: Add linker extern resolution support for functions and global variables")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link:
https://lore.kernel.org/bpf/20210507054119.270888-6-andrii@kernel.org
tools/lib/bpf/linker.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/linker.c
b/tools/lib/bpf/linker.c
index
3b1fbc2
..
b594a88
100644
(file)
--- a/
tools/lib/bpf/linker.c
+++ b/
tools/lib/bpf/linker.c
@@
-1788,7
+1788,7
@@
static void sym_update_visibility(Elf64_Sym *sym, int sym_vis)
/* libelf doesn't provide setters for ST_VISIBILITY,
* but it is stored in the lower 2 bits of st_other
*/
- sym->st_other &= 0x03;
+ sym->st_other &=
~
0x03;
sym->st_other |= sym_vis;
}