-
-
Notifications
You must be signed in to change notification settings - Fork 693
Closed
Labels
Description
In case you don't get notifications on closed issues, I am reposting this as a new issue.
I am hitting the warning "Not enough room left to rebuild" and I am not sure if we are supposed to resize it manually or it does it for us. Afaict from the implementation it is the latter.
But then, regarding the test introduced in 402e7a9, shouldn't the new paths be bigger than the current ones to check that the rebuilding works
LIEF/tests/macho/test_builder.py
Lines 620 to 624 in c4069b6
assert rpaths[0].path == "/tmp" assert rpaths[1].path == "/var" rpaths[0].path = "/foo" rpaths[1].path = "/bar" something like
rpaths[0].path = "@loader_path/some/very/long/path/that/will/trigger/not/enough/room/to/rebuild" rpaths[1].path = "/bar"Let me know if I got this wrong and it is supposed to be used differently. For context, I am trying to do something along the lines
import lief.MachO fat_macho = lief.MachO.parse(artifact) for macho_it in range(fat_macho.size): macho = fat_macho.at(macho_it) macho.remove(lief.MachO.LoadCommand.TYPE.RPATH) for rpath in final_rpaths: macho_rpath = lief.MachO.RPathCommand.create(rpath) macho.add(macho_rpath) fat_macho.write(str(artifact))