You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let name = "test.o";let file = File::create(Path::new(name)).unwrap();letmut obj = ArtifactBuilder::new(Triple{architecture:Architecture::X86_64,vendor:Vendor::Unknown,operating_system:OperatingSystem::Unknown,environment:Environment::Unknown,binary_format:BinaryFormat::Elf,}).name(name.to_owned()).finish();
obj.declare("zeroinit",Decl::data()).unwrap();
obj.define_zero_init("zeroinit",8).unwrap();
obj.write(file).unwrap();
$ readelf -sW test.o
Symbol table '.symtab' contains 4 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS test.o
2: 0000000000000000 0 SECTION LOCAL DEFAULT 3
3: 0000000000000000 0 OBJECT LOCAL DEFAULT 3 zeroinit
zeroinit should have a size of 8, not a size of 0.
The text was updated successfully, but these errors were encountered:
My first question is the size the physical disk size or memory size? Physical disk size should be 0; if memory size isn't 8 then yes, it appears to be wrong.
My first question is the size the physical disk size or memory size? Physical disk size should be 0; if memory size isn't 8 then yes, it appears to be wrong.
Symbols only ever have the memory size. The bug appears to be that the file size is being used.
STR:
zeroinit
should have a size of 8, not a size of 0.The text was updated successfully, but these errors were encountered: