10000 Missing `.riscv.attributes` section in the output image when bitcode inputs are used · Issue #64 · qualcomm/eld · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Missing .riscv.attributes section in the output image when bitcode inputs are used #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
partaror opened this issue Apr 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@partaror
Copy link

The output image does not contain .riscv.attributes section when the input contains bitcode inputs.

Reproducible example:

#!/usr/bin/env bash

cat >1.c <<\EOF
int foo() { return 1; }
EOF

clang -o 1.bc 1.c -c -flto -target riscv32
clang -o 1.o 1.c -target riscv32 -c

ld.eld -o 1.eld.out -m elf32lriscv 1.o -T script.t 
ld.eld -o 1.eld.lto.out -m elf32lriscv 1.bc -T script.t

llvm-readelf -S 1.eld.out | grep .riscv.attributes
llvm-readelf -S 1.eld.lto.out | grep .riscv.attributes

Output:

+ cat
+ clang -o 1.bc 1.c -c -flto -target riscv32
+ clang -o 1.o 1.c -target riscv32 -c
+ ld.eld -o 1.eld.out -m elf32lriscv 1.o -T script.t
+ ld.eld -o 1.eld.lto.out -m elf32lriscv 1.bc -T script.t
Note: Using 8 threads for LTO code generation.
+ grep .riscv.attributes
+ llvm-readelf -S 1.eld.out
  [ 2] .riscv.attributes RISCV_ATTRIBUTES 00000000 001012 00004e 00      0   0  1
+ llvm-readelf -S 1.eld.lto.out
+ grep .riscv.attributes
@partaror partaror added the bug Something isn't working label Apr 29, 2025
@quic-seaswara
Copy link
Contributor

#65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0