mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-04 16:50:06 +00:00
Fix ELF note alignment
The individual entries should be 4-byte aligned. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
2c5f34aee0
commit
73fdaa816d
@ -260,6 +260,9 @@ if ($from_notes) {
|
||||
my $desc = substr($data, 0, $desc_size, '');
|
||||
print("Found package '$name'\n");
|
||||
push @packages, $name;
|
||||
# notes are 4-byte aligned, the header is already a multiple of 4 bytes, so:
|
||||
my $skip = 3 & (4 - (3 & ($name_size + $desc_size)));
|
||||
substr($data, 0, $skip, '');
|
||||
}
|
||||
die "trailing data in notes section\n" if length($data);
|
||||
@ARGV = @packages;
|
||||
|
@ -10,7 +10,7 @@ pub struct Info {
|
||||
}
|
||||
*/
|
||||
|
||||
#[repr(C, packed)]
|
||||
#[repr(C, align(4))]
|
||||
pub struct ElfNote<const N: usize> {
|
||||
pub name_size: u32,
|
||||
pub desc_size: u32,
|
||||
|
Loading…
Reference in New Issue
Block a user