diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f312688 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +libabigail-2.2.tar.xz filter=lfs diff=lfs merge=lfs -text diff --git a/0001-compiler-flags.patch b/0001-compiler-flags.patch deleted file mode 100644 index 36ba20c..0000000 --- a/0001-compiler-flags.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ab8228fb82a9806b978aff4cc693900729eb0e03 Mon Sep 17 00:00:00 2001 -From: caodongxia <315816521@qq.com> -Date: Thu, 20 May 2021 21:11:22 +0800 -Subject: [PATCH] create patch - ---- - build-aux/ltmain.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh -index e9c06d7..375e99c 100644 ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -6523,7 +6523,7 @@ func_mode_link () - old_convenience= - deplibs= - old_deplibs= -- compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" -+ compiler_flags="-specs=/usr/lib/rpm/generic-hardened-ld" - linker_flags= - dllsearchpath= - lib_search_path=`pwd` --- -2.27.0 - diff --git a/0002-abg-reader-fix-comment-of-function.patch b/0002-abg-reader-fix-comment-of-function.patch deleted file mode 100644 index 89b01ec..0000000 --- a/0002-abg-reader-fix-comment-of-function.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a2263db66eb8ae10614ac1c4ab942bda8c7cd78c Mon Sep 17 00:00:00 2001 -From: Xiaole He via Libabigail -Date: Mon, 19 Sep 2022 18:03:50 +0800 -Subject: [PATCH] abg-reader: fix comment of function - -In 'src/abg-reader.cc', the function -'walk_xml_node_to_map_type_ids(read_context& ctxt, xmlNodePtr node)' -finds all of the child nodes of 'node' that has the 'id' attribute, -and then put the child node into map where the 'id' of the child node -as key and the child node itself as the value. -But the comment for this function writes: -/* src/abg-reader.cc begin */ -/// Walk an entire XML sub-tree to build a map where the key is the -/// the value of the 'id' attribute (for type definitions) and the key -/// is the xml node containing the 'id' attribute. -... -static void -walk_xml_node_to_map_type_ids(read_context& ctxt, - xmlNodePtr node) -... -/* src/abg-reader.cc end */ -The second and third lines of the comment above says the the child node -as the key of the map, but it should be the value of the map. -This patch fix the problematic comment described above, from -'and the key is the xml node' to 'and the value is the xml node'. - - * src/abg-reader.cc (walk_xml_node_to_map_type_ids): fix comment - -Signed-off-by: Xiaole He -Signed-off-by: Dodji Seketeli ---- - src/abg-reader.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/abg-reader.cc b/src/abg-reader.cc -index 1ca36b7..1df3515 100644 ---- a/src/abg-reader.cc -+++ b/src/abg-reader.cc -@@ -1418,7 +1418,7 @@ advance_cursor(read_context& ctxt) - } - - /// Walk an entire XML sub-tree to build a map where the key is the --/// the value of the 'id' attribute (for type definitions) and the key -+/// the value of the 'id' attribute (for type definitions) and the value - /// is the xml node containing the 'id' attribute. - /// - /// @param ctxt the context of the reader. --- -2.27.0 - diff --git a/0003-abg-ir-add-missing-else.patch b/0003-abg-ir-add-missing-else.patch deleted file mode 100644 index aaa0037..0000000 --- a/0003-abg-ir-add-missing-else.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 1ed036e2573e1fc9a1a0aed720eee20a921a38ed Mon Sep 17 00:00:00 2001 -From: Xiaole He -Date: Sun, 16 Oct 2022 04:26:42 +0000 -Subject: [PATCH 1/3] abg-ir: add missing else - -In 'bind_function_type_life_time' function of 'src/abg-ir.cc', the code -obtains the member 'const environment*' of 'class function_type', that -is, the 'e' variable in below code. And assure the obtained -'environment*' is same as the 'const environment*' of the -'class translation_unit', that is, the'env' variable in below code: - -/* src/abg-ir.cc begin */ -1 void -2 translation_unit::bind_function_type_life_time(function_type_sptr ftype) -3 { -4 ... -5 const environment* env = get_environment(); -6 ... -7 if (const environment* e = ftype->get_environment()) -8 ABG_ASSERT(env == e); -9 ftype->set_environment(const_cast(env)); -10 -11 if (const translation_unit* existing_tu = ftype->get_translation_unit()) -12 ABG_ASSERT(existing_tu == this); -13 else -14 ftype->set_translation_unit(const_cast(this)); -15 ... -/* src/abg-ir.cc end */ - -There was a missing 'else' between the 'line 8' and line 9', as the -explicit 'else' at the 'line 13'. Without the 'else' between the -'line 8' and line 9', there will be a redundant assignment at 'line 9' -under the condition when the 'env' is equal to 'e'. -This patch add the missing 'else' between the 'line 8' and 'line 9'. - - * src/abg-ir.cc (bind_function_type_life_time): add missing - else - -Signed-off-by: Xiaole He -Tested-by: Xiaole He ---- - src/abg-ir.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/abg-ir.cc b/src/abg-ir.cc -index 4f19e07..a93c494 100644 ---- a/src/abg-ir.cc -+++ b/src/abg-ir.cc -@@ -1394,7 +1394,8 @@ translation_unit::bind_function_type_life_time(function_type_sptr ftype) const - // translation unit. - if (const environment* e = ftype->get_environment()) - ABG_ASSERT(env == e); -- ftype->set_environment(const_cast(env)); -+ else -+ ftype->set_environment(const_cast(env)); - - if (const translation_unit* existing_tu = ftype->get_translation_unit()) - ABG_ASSERT(existing_tu == this); --- -2.27.0 - diff --git a/0004-abg-reader-optimize-if-construction.patch b/0004-abg-reader-optimize-if-construction.patch deleted file mode 100644 index 91c4a10..0000000 --- a/0004-abg-reader-optimize-if-construction.patch +++ /dev/null @@ -1,96 +0,0 @@ -From ead3e6317af191324d9044400152e9c881fc3126 Mon Sep 17 00:00:00 2001 -From: Xiaole He -Date: Sun, 16 Oct 2022 06:47:03 +0000 -Subject: [PATCH 2/3] abg-reader: optimize if construction - -In 'build_enum_type_decl' function of 'src/abg-reader.cc', the -'for loop' walk through all the child nodes of the '' for -seeking '' and '': - -/* original src/abg-reader.cc begin */ -static enum_type_decl_sptr -build_enum_type_decl(read_context& ctxt, - const xmlNodePtr node, - bool add_to_current_scope) -{ - ... - for (xmlNodePtr n = xmlFirstElementChild(node); - n; - n = xmlNextElementSibling(n)) - { - if (xmlStrEqual(n->name, BAD_CAST("underlying-type"))) - { - ... - } - - if (xmlStrEqual(n->name, BAD_CAST("enumerator"))) - { - ... - } - } - ... -} -/* original src/abg-reader.cc end */ - -Here uses 2 separate 'if' statements for seeking, that is, for any -child node of the '', there involves 2 'if' comparations. -Because the child node of the '' is either -'' or '', there would be a slight -optimization when use 'if-else if' construction instead, like below: - -/* optimized src/abg-reader.cc begin */ -for (xmlNodePtr n = xmlFirstElementChild(node); - n; - n = xmlNextElementSibling(n)) - { - if (xmlStrEqual(n->name, BAD_CAST("underlying-type"))) - { - ... - } - else if (xmlStrEqual(n->name, BAD_CAST("enumerator"))) - { - ... - } - } -/* optimized src/abg-reader.cc end */ - -Supposing there has the test case: - -/* test case begin */ - - - - - - - -/* test case end */ - -When parsing the '' xml tag, for the original -'src/abg-reader.cc', there involves 2 'if' comparations. But involves -only 1 'if' comparation for the optimized 'src/abg-reader.cc'. - -Signed-off-by: Xiaole He -Tested-by: Xiaole He -Signed-off-by: Dodji Seketeli ---- - src/abg-reader.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/abg-reader.cc b/src/abg-reader.cc -index 1df3515..ebb55e9 100644 ---- a/src/abg-reader.cc -+++ b/src/abg-reader.cc -@@ -4356,8 +4356,7 @@ build_enum_type_decl(read_context& ctxt, - base_type_id = CHAR_STR(a); - continue; - } -- -- if (xmlStrEqual(n->name, BAD_CAST("enumerator"))) -+ else if (xmlStrEqual(n->name, BAD_CAST("enumerator"))) - { - string name; - int64_t value = 0; --- -2.27.0 - diff --git a/0005-abg-diff-utils-fix-typo-in-comments.patch b/0005-abg-diff-utils-fix-typo-in-comments.patch deleted file mode 100644 index 5e3d634..0000000 --- a/0005-abg-diff-utils-fix-typo-in-comments.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 1058fa9cecaef8f39066a4d76b82c97f7f5b10ea Mon Sep 17 00:00:00 2001 -From: Xiaole He -Date: Sun, 16 Oct 2022 07:02:25 +0000 -Subject: [PATCH 3/3] abg-diff-utils: fix typo in comments - -Fix typo in comments, from 'pased' to 'passed'. - - * src/abg-diff-utils.h: fix typo in comments - -Signed-off-by: Xiaole He -Signed-off-by: Dodji Seketeli ---- - include/abg-diff-utils.h | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/include/abg-diff-utils.h b/include/abg-diff-utils.h -index 0628950..0389d7c 100644 ---- a/include/abg-diff-utils.h -+++ b/include/abg-diff-utils.h -@@ -803,7 +803,7 @@ struct deep_ptr_eq_functor - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param k the number of the diagonal on which we want to find the -@@ -942,7 +942,7 @@ end_of_fr_d_path_in_k(int k, int d, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param k the number of the diagonal on which we want to find the -@@ -1116,7 +1116,7 @@ is_match_point(RandomAccessOutputIterator a_begin, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_begin an iterator pointing to the begining of sequence A. -@@ -1308,7 +1308,7 @@ print_snake(RandomAccessOutputIterator a_begin, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a the first sequence we care about. -@@ -1444,7 +1444,7 @@ snake_end_points(const snake& s, point&, point&); - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_base the iterator to the base of the first sequence. -@@ -1653,7 +1653,7 @@ compute_diff(RandomAccessOutputIterator a_base, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_start an iterator to the beginning of the first sequence -@@ -1719,7 +1719,7 @@ compute_diff(RandomAccessOutputIterator a_begin, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_base the iterator to the base of the first sequence. -@@ -1779,7 +1779,7 @@ compute_diff(RandomAccessOutputIterator a_base, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_start an iterator to the beginning of the first sequence -@@ -1879,7 +1879,7 @@ compute_diff(RandomAccessOutputIterator a_begin, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_base the iterator to the base of the first sequence. -@@ -1935,7 +1935,7 @@ compute_diff(RandomAccessOutputIterator a_base, - /// call operator member returning a boolean and taking two arguments - /// that must be of the same type as the one pointed to by the @ref - /// RandomAccessOutputIterator template parameter. This functor is --/// used to compare the elements referred to by the iterators pased in -+/// used to compare the elements referred to by the iterators passed in - /// argument to this function. - /// - /// @param a_start an iterator to the beginning of the first sequence --- -2.27.0 - diff --git a/0006-Bug-29829-dwarf-reader-Allow-DIEs-to-be-in-a-lexical.patch b/0006-Bug-29829-dwarf-reader-Allow-DIEs-to-be-in-a-lexical.patch deleted file mode 100644 index da13586..0000000 --- a/0006-Bug-29829-dwarf-reader-Allow-DIEs-to-be-in-a-lexical.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 08ed347ebfd108c9c1de0ba65f9a947fda1617ab Mon Sep 17 00:00:00 2001 -From: Dodji Seketeli -Date: Fri, 2 Dec 2022 15:59:13 +0000 -Subject: [PATCH] Bug 29829 - dwarf-reader: Allow DIEs to be in a lexical block - -Normally, ABI-relevant DWARF DIEs (types and decls) should be at -namespace level. There are real-life cases where such a DIE might be -defined in a lexical block. - -This patch teaches the DWARF reader to handle such cases. - - * src/abg-dwarf-reader.cc (get_scope_for_die): Support - DW_TAG_lexical_block as DIE scope. - -Signed-off-by: Dodji Seketeli ---- - src/abg-dwarf-reader.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc -index 1d6ad24..895a55d 100644 ---- a/src/abg-dwarf-reader.cc -+++ b/src/abg-dwarf-reader.cc -@@ -10961,7 +10961,8 @@ get_scope_for_die(read_context& ctxt, - scope_decl_sptr s; - type_or_decl_base_sptr d; - if (dwarf_tag(&parent_die) == DW_TAG_subprogram -- || dwarf_tag(&parent_die) == DW_TAG_array_type) -+ || dwarf_tag(&parent_die) == DW_TAG_array_type -+ || dwarf_tag(&parent_die) == DW_TAG_lexical_block) - // this is an entity defined in a scope that is a function. - // Normally, I would say that this should be dropped. But I have - // seen a case where a typedef DIE needed by a function parameter --- -2.27.0 - diff --git a/libabigail-2.0.tar.gz b/libabigail-2.0.tar.gz deleted file mode 100644 index 1376a99..0000000 Binary files a/libabigail-2.0.tar.gz and /dev/null differ diff --git a/libabigail-2.2.tar.xz b/libabigail-2.2.tar.xz new file mode 100644 index 0000000..de547ce --- /dev/null +++ b/libabigail-2.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08b72af0454ffd8052103fe34af352da348d24b13c9b3c8f9d140d656bfdc759 +size 325058560 diff --git a/libabigail.spec b/libabigail.spec index ab3e17a..be59fb8 100644 --- a/libabigail.spec +++ b/libabigail.spec @@ -1,16 +1,10 @@ Name: libabigail -Version: 2.0 -Release: 4 +Version: 2.2 +Release: 1 Summary: ABI generic analysis and instrumentation library License: LGPLv3+ URL: https://sourceware.org/libabigail/ -Source0: http://mirrors.kernel.org/sourceware/libabigail/libabigail-%{version}.tar.gz -Patch0000: 0001-compiler-flags.patch -Patch0001: 0002-abg-reader-fix-comment-of-function.patch -Patch0002: 0003-abg-ir-add-missing-else.patch -Patch0003: 0004-abg-reader-optimize-if-construction.patch -Patch0004: 0005-abg-diff-utils-fix-typo-in-comments.patch -Patch0005: 0006-Bug-29829-dwarf-reader-Allow-DIEs-to-be-in-a-lexical.patch +Source0: http://mirrors.kernel.org/sourceware/libabigail/libabigail-%{version}.tar.xz BuildRequires: gcc-c++ libtool elfutils-devel libxml2-devel doxygen BuildRequires: python3-sphinx texinfo dos2unix dpkg python3-devel python3-rpm BuildRequires: python3-mock python3-unittest2 python3-pyxdg wget mailcap @@ -79,7 +73,7 @@ fi %files %{_bindir}/{abicompat,abidiff,abidw,abilint,abipkgdiff,kmidiff} -%{_libdir}/{libabigail.so.0,libabigail.so.0.0.0} +%{_libdir}/{libabigail.so.1,libabigail.so.1.0.0} %{_libdir}/libabigail/default.abignore %files devel @@ -96,6 +90,9 @@ fi %doc doc/manuals/html/* README AUTHORS ChangeLog %changelog +* Wed Apr 12 2023 xu_ping <707078654@qq.com> - 2.2-1 +- Upgrade to 2.2 + * Fri Dec 9 2022 Xiaole He - 2.0-4 - backport patch:0006 to fix coredump of libxul.so from thunderbird rpm