Skip to content

LLD --save-temps ELF object file output does not set e_flags the same as for the final link #65146

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

Closed
ilovepi opened this issue Aug 31, 2023 · 4 comments
Labels
duplicate Resolved as duplicate LTO Link time optimization (regular/full LTO or ThinLTO)

Comments

@ilovepi
Copy link
Contributor

ilovepi commented Aug 31, 2023

While investigating #65090, using --save-temps I was surprised that the e_flags in the lto.o file were not the same as those in the final linked binary. This makes using tools like llvm-objdump hard to use without passing several other flags. I'm not sure if this is related to RISC-V target features or if this is an existing problem that goes beyond RISC-V.

CC: @MaskRay Is this a known issue? Is there a workaround?

@llvmbot
Copy link
Member

llvmbot commented Aug 31, 2023

@llvm/issue-subscribers-lld-elf

@MaskRay
Copy link
Member

MaskRay commented Sep 1, 2023

This isn't an lld/ELF issue. It's the LTO target-abi target-features problem that is tracked elsewhere

#50591
#59350

@MaskRay MaskRay closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
@EugeneZelenko EugeneZelenko added duplicate Resolved as duplicate LTO Link time optimization (regular/full LTO or ThinLTO) and removed lld:ELF labels Sep 1, 2023
@MaskRay
Copy link
Member

MaskRay commented Sep 1, 2023

Closing as we have other, more canonical places for discussion, but I'll keep this in mind:)

@frobtech
Copy link
Contributor

frobtech commented Sep 1, 2023

The flags are correct in the final link output, so how is it not an lld issue that its -save-temps .lto.o file is not consistent with what winds up in the final link file it produces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Resolved as duplicate LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

No branches or pull requests

5 participants