Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 015715694eadd714b903f30ade876e0738d44974 Mon Sep 17 00:00:00 2001 |
| 2 | From: Randy Witt <randy.e.witt@linux.intel.com> |
| 3 | Date: Mon, 5 Jan 2015 15:09:20 -0800 |
| 4 | Subject: [PATCH] Ignore DWARF sections. |
| 5 | |
| 6 | Assume for now that we don't care about the DWARF sections due to path |
| 7 | differences. However, in the case the tool is ran on a "debug" package |
| 8 | it will most likely falsely say the packages have no differences. |
| 9 | |
| 10 | Upstream-Status: Inappropriate [other] |
| 11 | |
| 12 | The package difference tool is correctly labelling the packages as different |
| 13 | when the DWARF sections don't match due to paths. The paths in the debug info |
| 14 | should actually be made to be the same using compile flags or some other |
| 15 | mechanism. |
| 16 | |
| 17 | However, to make the tool more useful to Yocto until the work can be done |
| 18 | to ensure identical paths in debug sections, this patch is being applied. |
| 19 | |
| 20 | Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> |
| 21 | --- |
| 22 | pkg-diff.sh | 2 +- |
| 23 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 24 | |
| 25 | diff --git a/pkg-diff.sh b/pkg-diff.sh |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame^] | 26 | index 9c2125e..b0d77c8 100755 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | --- a/pkg-diff.sh |
| 28 | +++ b/pkg-diff.sh |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame^] | 29 | @@ -851,7 +851,7 @@ check_single_file() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | echo "" >$file1 |
| 31 | echo "" >$file2 |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame^] | 32 | # Don't compare .build-id, .gnu_debuglink and .gnu_debugdata sections |
| 33 | - sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" | tr "\n" " ")" |
| 34 | + sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" -e "\.debug_abbrev" -e "\.debug_aranges" -e "\.debug_frame" -e "\.debug_info" -e "\.debug_line" -e "\.debug_loc" -e "\.debug_macinfo" -e "\.debug_pubnames" -e "\.debug_pubtypes" -e "\.debug_ranges" -e "\.debug_str" | tr "\n" " ")" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | for section in $sections; do |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame^] | 36 | $OBJDUMP -s -j $section old/$file | sed "s,^old/,," > $file1 |
| 37 | $OBJDUMP -s -j $section new/$file | sed "s,^new/,," > $file2 |