[Bug 241437] objcopy --add-section doesn't work
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Oct 23 15:36:22 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241437
Bug ID: 241437
Summary: objcopy --add-section doesn't work
Product: Base System
Version: 12.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: arrowd at FreeBSD.org
I have created a simple C program:
# cat test.c
int main(int argc, char* argv[]) {return 0;}
Now I want to embed some data (its own LLVM bitcode, specifically) as an ELF
section. I do:
# clang test.c -c -o test.c.o
# clang -emit-llvm -c test.c -o test.c.bc
Now, if I run
# objcopy --add-section .llvm_bc=test.c.bc test.c.o
I get 0 exit code, but the section doesn't get added:
# readelf -S test.c.o | grep llvm
However, if I **just run the same command twice**
# objcopy --add-section .llvm_bc=test.c.bc test.c.o
the section gets added successfully.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list