forked from pool/rpmlint
Accepting request 720473 from home:marxin:branches:devel:openSUSE:Factory:rpmlint
- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with:
c59324fd68
OBS-URL: https://build.opensuse.org/request/show/720473
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=677
This commit is contained in:
parent
3fbea9d881
commit
2e95706365
@ -1,5 +1,5 @@
|
||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
||||
index 36d73f8..8200f1b 100644
|
||||
index 36d73f8..7257ffd 100644
|
||||
--- a/BinariesCheck.py
|
||||
+++ b/BinariesCheck.py
|
||||
@@ -73,6 +73,10 @@ class BinaryInfo(object):
|
||||
@ -8,7 +8,7 @@ index 36d73f8..8200f1b 100644
|
||||
|
||||
+ # [Nr] Name Type Address Off Size ES Flg Lk Inf Al
|
||||
+ # [ 1] .text PROGBITS 0000000000000000 000040 000000 00 AX 0 0 1
|
||||
+ text_section_regex = re.compile(r'\s*\[[ 0-9]+\]\s*\.text\s*\w+\s*\w*\s*\w*\w*\s*(\w*).*.')
|
||||
+ section_regex = re.compile(r'.*\] (?P<section>[^\s]*)\s*\w+\s*\w*\s*\w*\w*\s*(?P<size>\w*)')
|
||||
+
|
||||
def __init__(self, pkg, path, fname, is_ar, is_shlib):
|
||||
self.readelf_error = False
|
||||
@ -40,10 +40,10 @@ index 36d73f8..8200f1b 100644
|
||||
+ non_zero_text_segment = False
|
||||
+
|
||||
+ for line in lines:
|
||||
+ r = self.text_section_regex.search(line)
|
||||
+ if r:
|
||||
+ r = self.section_regex.search(line)
|
||||
+ if r and r.group('section').startswith('.text'):
|
||||
+ has_text_segment = True
|
||||
+ size = int(r.group(1), 16)
|
||||
+ size = int(r.group('size'), 16)
|
||||
+ if size > 0:
|
||||
+ non_zero_text_segment = True
|
||||
+ if has_text_segment and not non_zero_text_segment:
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 2 07:53:03 UTC 2019 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with:
|
||||
https://github.com/rpm-software-management/rpmlint/commit/c59324fd68ba86c8382fe09d43f12de32d764354
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 28 15:04:34 UTC 2019 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user