Closed dancrossnyc closed 3 years ago
Thanks for the fix; so i've added this line to the make api
test, so it should catch these kind of regressions in future hopefully; alloc was added after all the other tests, so i think the make api
test was omitted; let me know if you have any other issues with the features, especially on no std/alloc environments, this is not as well tested/covered as I would like, and would especially like to see those warnings disappear :) going to close this now since I believe you PR fixed it (and thanks again!)
I've also pushed new 0.4.1 version which includes your fix
Thank you!
When building goblin for no_std environments with the alloc and archive features enabled, I ran into build failures because the
to_vec
method onRelocSection
insrc/elf/reloc.rs
usesVec
, which wasn't visible:Importing
alloc::vec::Vec
is conditioned on theendian_fd
feature being enabled, but theto_vec
method (and it's use in theDebug
impl onRelocSection
) don't depend onendian_fd
.I was able to fix this by simply remove the
#[cfg(feature = "endian_fd")]
on theuse alloc::vec::Vec;
statement, which I believe is safe (sinceto_vec
usesVec
and is, AFAICT, always compiled in when features includealloc
):I'll send a PR.