On 2016-04-08 10:45, Aurelien Jarno wrote: > Hi, > > On 2016-04-07 11:51, James Cowgill wrote: > > > > Based only on chrpath and cmake reverse dependencies, there is an upper > > bound of about 1500 binNMUs (after the tools after fixed). Hopefully > > that can be reduced! > > > > I really don't have any time to fix all this. Please can someone else > > have a look! > > I'll try to do an archive scan asap to really get an idea on how many > packages are affected. After I'll look at how to fix chrpath, but help > would be welcome as I also don't have a lot of time.
Please find below a small quick and dirty python script to check that. There is probably a way to do it better and cleaner, but it does its job. I will start an archive scan and will start working on a chrpath fix. Aurelien #!/usr/bin/python3 from sys import argv, exit from elftools.elf.elffile import ELFFile, DynamicSection # MIPS specific constants DT_MIPS_BASE_ADDRESS=0x70000006 DT_MIPS_RLD_MAP=0x70000016 DT_MIPS_RLD_MAP_REL=0x70000035 good = True filename = argv[1] with open(filename, 'rb') as f: for section in ELFFile(f).iter_sections(): if not isinstance(section, DynamicSection): continue base = None rld_map = None rld_map_rel = None rld_map_rel_offset = None for index, tag in enumerate(section.iter_tags()): if tag.entry.d_tag == DT_MIPS_BASE_ADDRESS: base = tag.entry.d_val elif tag.entry.d_tag == DT_MIPS_RLD_MAP: rld_map = tag.entry.d_val elif tag.entry.d_tag == DT_MIPS_RLD_MAP_REL: rld_map_rel = tag.entry.d_val rld_map_rel_offset = section.header.sh_offset + index * section.header.sh_entsize if base and rld_map and rld_map_rel: if rld_map != base + rld_map_rel + rld_map_rel_offset: good = False print('%s: %s' % (filename, 'ok' if good else 'bad')) exit(0 if good else 1) -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net
signature.asc
Description: PGP signature