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

unexpected link behavior #121286

Open
FFreestanding opened this issue Dec 29, 2024 · 1 comment
Open

unexpected link behavior #121286

FFreestanding opened this issue Dec 29, 2024 · 1 comment

Comments

@FFreestanding
Copy link

Hi, I meet a unexpected link behavior.

I have four bitcode files: a.bc, b.bc, c.bc, d.bc.
All of them had defined three structures which are listed below.

%struct.atomic_t = type { i32 }
%struct.kuid_t = type { i32 }
%struct.inode = type { i16, i16, %struct.kuid_t, /*...*/ }

Then, using llvm-link to link them

llvm-link a.bc b.bc c.bc d.bc -S -o out.ll
%struct.inode = type { i16, i16, %struct.atomic_t, /*...*/ }

%struct.kuid_t (and other structures which is defined as type { i32 }) was replaced by %struct.atomic_t in %struct.inode (or other some structures)
The incident may be caused by LTO.
I wonder how to prevent this from happening.
Thanks for your help.

@FFreestanding
Copy link
Author

version: llvm-13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants