Comments (10)
objcopy
indeed corrupted the ELF file because the tool created section symbols as absolute symbols, which doesn't make sense.
from mold.
FYI: @andreas-schwab
from mold.
Could you also share a.o
?
from mold.
Sure:
a.o.tar.gz
from mold.
Does the above change work for you?
from mold.
Yes, it did.
Anyway, I don't think objcopy
corrupted the ELF container, but instead the sections are in the opposite order if I compare objdump -s out/test/elf/x86_64/exception-multiple-ehframe/c.o
before and after your change:
Contents of section .note.gnu.property:
0000 04000000 10000000 05000000 474e5500 ............GNU.
0010 010001c0 04000000 01000000 00000000 ................
Contents of section .eh_frame:
0000 1c000000 00000000 017a504c 52000178 .........zPLR..x
0010 10079b00 0000001b 1b0c0708 90010000 ................
0020 24000000 24000000 00000000 5b000000 $...$.......[...
0030 04000000 00410e10 8602430d 06458303 .....A....C..E..
- 0040 02510c07 08000000 .Q......
+ 0040 02510c07 08000000 00000000 .Q..........
Contents of section .eh_frame:
0000 1c000000 00000000 017a504c 52000178 .........zPLR..x
0010 10079b00 0000001b 1b0c0708 90010000 ................
0020 24000000 24000000 00000000 5b000000 $...$.......[...
0030 04000000 00410e10 8602430d 06458303 .....A....C..E..
- 0040 02510c07 08000000 00000000 .Q..........
+ 0040 02510c07 08000000 .Q......
Contents of section .gcc_except_table:
0000 ff9b1101 082b0530 01390500 00010000 .....+.0.9......
0010 00000000 ff9b1101 082b0530 01390500 .........+.0.9..
0020 00010000 00000000 ........
from mold.
Can we please reopen it?
from mold.
sed is only guaranteed to work on text files.
from mold.
Can you try llvm-objcopy
if it does the same?
from mold.
I'll use perl
instead of sed
to modify the binary files.
from mold.
Related Issues (20)
- Building with pyo3 and maturin works with default linker, but not with mold HOT 1
- XWayland segfaults when linked with mold HOT 3
- tool-x
- make install does not install libblake3.so HOT 1
- Compiling from source on CPU without AVX2 fails HOT 2
- .rodata wrong with rust HOT 26
- not able to compile in windows . HOT 3
- -lc not working HOT 3
- --wrap support for MacOS HOT 3
- [Question] Is `mold` any compatible at all with wine-tkg (and anything Wine related) to build? HOT 2
- Binaries linked with mold-2.30.0 randomly either work or crash in `_dl_relocate_object` HOT 4
- Fold sold back into mold? HOT 1
- arm-arm_abs-error failed: sorry, unimplemented: Thumb-1 'hard-float' VFP ABI HOT 3
- `mold 2.31.0` build failure when targeting `ARMv6` HOT 3
- retain, used and perhaps wildcard-matching using retain-symbols-file HOT 13
- Missing -z option rodynamic HOT 1
- riscv64-shared-abs-sym fails with 2.31.0 HOT 2
- Statically linked binaries crash with illegal hardware instructions HOT 7
- Cannot build project using tealr and Mold linker HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mold.