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: [email protected]
Reporter: [email protected]
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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"