When we create module (or per kernel) lds struct, we fix its alignment as the largest of struct
members. Add padding at the end of the struct so that the size of struct is multiple of its alignment.
Details
Details
- Reviewers
rampitec foad arsenm JonChesterfield
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
When we create module (or per kernel) lds struct, we fix its alignment as the largest of struct
members. Add padding at the end of the struct so that the size of struct is multiple of its alignment.
Why?
Comment Actions
Actually, in general scenario it is needed - imagine that we create an array of struct, if we don't do it, then array elements starting from index may not aligned.
But here it is special case. We don't create array of these structs. Hence it is not required here. I will abondon the patch.
Comment Actions
module (and kernel) lds struct is a special case, where we do not need padding at the end of struct, I realized it later. Hence, this patch does not make sense, abandoning it.