Blame SOURCES/0001-Fix-abidw-output-for-missing-variadic-arguments.patch

b15ea1
From e9b282cbd147eac515c53aa500720de3a43366f3 Mon Sep 17 00:00:00 2001
b15ea1
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
b15ea1
Date: Tue, 27 Oct 2020 13:06:15 +0100
b15ea1
Subject: [PATCH] Fix abidw output for missing variadic arguments
b15ea1
MIME-Version: 1.0
b15ea1
Content-Type: text/plain; charset=UTF-8
b15ea1
Content-Transfer-Encoding: 8bit
b15ea1
b15ea1
GCC forgets to add the varidic arguments into debugging data if the
b15ea1
compilation unit is built with -flto option. As a result, the prebuilt
b15ea1
XML ABI dumps were missing the last argument at 4 functions (e.g.
b15ea1
efi_error_set()).
b15ea1
b15ea1
This was unnoticed until Fedora enabled LTO globally and had to
b15ea1
disable LTO in efivar explicitly because efivar uses symbol versioning
b15ea1
with top-level assembler statements which is not compatible with LTO.
b15ea1
b15ea1
Since then the abicheck failed:
b15ea1
b15ea1
make[2]: Leaving directory '/builddir/build/BUILD/efivar-37/src'
b15ea1
abidiff \
b15ea1
 --suppr abignore \
b15ea1
 --headers-dir2 /builddir/build/BUILD/efivar-37/src/include/efivar/ \
b15ea1
 libefivar.abixml \
b15ea1
 libefivar.so
b15ea1
Functions changes summary: 0 Removed, 2 Changed (8 filtered out), 0 Added functions
b15ea1
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
b15ea1
2 functions with some indirect sub-type change:
b15ea1
  [C]'function int _efi_set_variable_variadic(efi_guid_t, const char*, uint8_t*, size_t, uint32_t)' at lib.c:44:1 has some indirect sub-type changes:
b15ea1
    parameter 6 of type '...' was added
b15ea1
  [C]'function int efi_error_set(const char*, const char*, int, int, const char*)' at error.c:86:1 has some indirect sub-type changes:
b15ea1
    parameter 6 of type '...' was added
b15ea1
make[1]: *** [/builddir/build/BUILD/efivar-37/src/include/rules.mk:41: libefivar.abicheck] Error 4
b15ea1
make[1]: Leaving directory '/builddir/build/BUILD/efivar-37/src'
b15ea1
b15ea1
This patch corrects the pregenerated abixml files that were probably
b15ea1
generated with the faulty GCC.
b15ea1
b15ea1
<https://bugzilla.redhat.com/show_bug.cgi?id=1863475>
b15ea1
<https://bugzilla.redhat.com/show_bug.cgi?id=1891787>
b15ea1
b15ea1
Signed-off-by: Petr Písař <ppisar@redhat.com>
b15ea1
---
b15ea1
 src/libefiboot.abixml | 2 ++
b15ea1
 src/libefivar.abixml  | 2 ++
b15ea1
 2 files changed, 4 insertions(+)
b15ea1
b15ea1
diff --git a/src/libefiboot.abixml b/src/libefiboot.abixml
b15ea1
index 4a0253b..ab75cbb 100644
b15ea1
--- a/src/libefiboot.abixml
b15ea1
+++ b/src/libefiboot.abixml
b15ea1
@@ -1800,6 +1800,7 @@
b15ea1
       <parameter type-id='type-id-18' name='size'/>
b15ea1
       <parameter type-id='type-id-215' name='filepath'/>
b15ea1
       <parameter type-id='type-id-5' name='options'/>
b15ea1
+      <parameter is-variadic='yes'/>
b15ea1
       <return type-id='type-id-18'/>
b15ea1
     </function-decl>
b15ea1
     <function-decl name='efi_generate_file_device_path_from_esp' mangled-name='efi_generate_file_device_path_from_esp' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='efi_generate_file_device_path_from_esp@@libefiboot.so.0'>
b15ea1
@@ -1809,6 +1810,7 @@
b15ea1
       <parameter type-id='type-id-25' name='partition'/>
b15ea1
       <parameter type-id='type-id-214' name='relpath'/>
b15ea1
       <parameter type-id='type-id-5' name='options'/>
b15ea1
+      <parameter is-variadic='yes'/>
b15ea1
       <return type-id='type-id-18'/>
b15ea1
     </function-decl>
b15ea1
     <function-decl name='efidp_make_hd' mangled-name='efidp_make_hd' filepath='src/include/efivar/efivar-dp.h' line='735' column='1' visibility='default' binding='global' size-in-bits='64'>
b15ea1
diff --git a/src/libefivar.abixml b/src/libefivar.abixml
b15ea1
index a719b8b..2dbb838 100644
b15ea1
--- a/src/libefivar.abixml
b15ea1
+++ b/src/libefivar.abixml
b15ea1
@@ -393,6 +393,7 @@
b15ea1
       <parameter type-id='type-id-4' name='line' filepath='/usr/include/string.h' line='102' column='1'/>
b15ea1
       <parameter type-id='type-id-4' name='error' filepath='/usr/include/string.h' line='103' column='1'/>
b15ea1
       <parameter type-id='type-id-58' name='fmt' filepath='/usr/include/string.h' line='104' column='1'/>
b15ea1
+      <parameter is-variadic='yes'/>
b15ea1
       <return type-id='type-id-4'/>
b15ea1
     </function-decl>
b15ea1
     <typedef-decl name='__mode_t' type-id='type-id-1' filepath='/usr/include/bits/types.h' line='150' column='1' id='type-id-59'/>
b15ea1
@@ -467,6 +468,7 @@
b15ea1
       <parameter type-id='type-id-22' name='data' filepath='/usr/include/unistd.h' line='58' column='1'/>
b15ea1
       <parameter type-id='type-id-23' name='data_size' filepath='/usr/include/unistd.h' line='59' column='1'/>
b15ea1
       <parameter type-id='type-id-3' name='attributes' filepath='/usr/include/unistd.h' line='59' column='1'/>
b15ea1
+      <parameter is-variadic='yes'/>
b15ea1
       <return type-id='type-id-4'/>
b15ea1
     </function-decl>
b15ea1
     <function-decl name='_efi_set_variable' mangled-name='_efi_set_variable' filepath='/usr/include/unistd.h' line='46' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_efi_set_variable@libefivar.so.0'>
b15ea1
-- 
b15ea1
2.25.4
b15ea1