--- BinariesCheck.py +++ BinariesCheck.py @@ -51,10 +51,11 @@ class BinaryInfo: self.exec_stack = 0 self.debuginfo=0 self.symtab=0 + self.compileOpts=set() is_debug=BinaryInfo.debug_file_regex.search(path) - cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d'] + cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d', '-p', '.comment.SUSE.OPTs'] cmd.append(path) res = Pkg.getstatusoutput(cmd) if not res[0]: @@ -100,6 +101,9 @@ class BinaryInfo: self.symtab=1 continue + if l.lower().find(" ospwg") != -1: + self.compileOpts.add(l.rpartition(' ')[2]) + if self.non_pic: self.non_pic=BinaryInfo.non_pic_regex.search(res[1]) else: