Skip to content
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

lld: error: section size decrease is too large on RISCV64 #63374

Closed
kraj opened this issue Jun 18, 2023 · 7 comments
Closed

lld: error: section size decrease is too large on RISCV64 #63374

kraj opened this issue Jun 18, 2023 · 7 comments

Comments

@kraj
Copy link
Contributor

kraj commented Jun 18, 2023

In an attempt to make LLD as default linker in a Yocto distro,
when using LLD/RISC-V64 from Clang 16.0.6 several packages are failing to link with below error

riscv64-yoe-linux-ld.lld: error: section size decrease is too large

I have collected all objects and libs into a single place to reproduce it. test case is here
https://uclibc.org/~kraj/lld-riscv-fail.tar.xz

Inside the tarball there is a script called a.sh when run sh ./a.sh shows the problem.
it links fine with bfd linker, it also linked fine with LLD if --no-relax option is added to it.

@MaskRay any ideas ?

@topperc
Copy link
Collaborator

topperc commented Jun 18, 2023

This may have been fixed by 9d37ea9

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 18, 2023

@llvm/issue-subscribers-backend-risc-v

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 18, 2023

@llvm/issue-subscribers-lld-elf

@kraj
Copy link
Contributor Author

kraj commented Jun 18, 2023

This may have been fixed by 9d37ea9

yes indeed, I backported the above fix to clang16 branch and it seems to work

@asb asb added this to the LLVM 16.0.X Release milestone Jun 22, 2023
@asb
Copy link
Contributor

asb commented Jun 22, 2023

Marking this as "LLVM 16.0.x release" because if another 16.0.x is produced we'd like to backport this fix, but we probably wouldn't request a new point release just due to this fix if it wasn't happening anyway.

@MaskRay
Copy link
Member

MaskRay commented Jul 6, 2023

Yes, the large section use case was supported by 9d37ea9 . When I implemented the relaxation, I thought that 65535 was sufficient.

If we still do a 16.0.6 release after https://discourse.llvm.org/t/16-0-5-release/71097 , this commit is a good candidate.

@MaskRay
Copy link
Member

MaskRay commented Sep 1, 2023

Fixed for 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

No branches or pull requests

6 participants