Hi,

I was also able to reproduce the problem you reported after fixing the
relocation error.

Attached is a debdiff; I committed all changes upstream as well.

Feel free to upload, I'll also ask my regular sponsor, but he's still on
vacation for some time.

Cheers,
  Stefan.
diff -Nru faumachine-20180503/debian/changelog 
faumachine-20180503/debian/changelog
--- faumachine-20180503/debian/changelog        2018-05-07 20:49:15.000000000 
+0200
+++ faumachine-20180503/debian/changelog        2018-08-03 20:50:14.000000000 
+0200
@@ -1,3 +1,13 @@
+faumachine (20180503-2) unstable; urgency=medium
+
+  * Cherry-pick upstream fixes for DBTS: 902459 (Closes: #902459):
+    + Add 01-handle-R_X86_64_PLT32.patch to handle new relocations
+      emitted by newer gcc/ld.
+    + Add 02-new-iasl.patch to handle changed output of newer
+      iasl verions.
+
+ -- Stefan Potyra <ste...@potyra.de>  Fri, 03 Aug 2018 20:50:14 +0200
+
 faumachine (20180503-1) unstable; urgency=medium
 
   * New upstream release, highlights:
diff -Nru faumachine-20180503/debian/patches/01-handle-R_X86_64_PLT32.patch 
faumachine-20180503/debian/patches/01-handle-R_X86_64_PLT32.patch
--- faumachine-20180503/debian/patches/01-handle-R_X86_64_PLT32.patch   
1970-01-01 01:00:00.000000000 +0100
+++ faumachine-20180503/debian/patches/01-handle-R_X86_64_PLT32.patch   
2018-08-03 20:48:11.000000000 +0200
@@ -0,0 +1,17 @@
+Description: Fix relocation of R_X86_64_PLT32
+Origin: Upstream, c760351c46a9ed1283419df4384dedfa2b4089ad
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902459
+Applied-Upstream: c760351c46a9ed1283419df4384dedfa2b4089ad
+
+Index: faumachine-20180503/chips/qemu/dyngen.c
+===================================================================
+--- faumachine-20180503.orig/chips/qemu/dyngen.c
++++ faumachine-20180503/chips/qemu/dyngen.c
+@@ -2969,6 +2969,7 @@ void gen_code(const char *name, host_ulo
+                                 reloc_offset, name_, addend);
+                         break;
+                     case R_X86_64_PC32:
++                  case R_X86_64_PLT32:
+                         fprintf(outfile, "    *(uint32_t *)(gen_code_ptr + 
%d) = %s - (long)(gen_code_ptr + %d) + %d;\n", 
+                                 reloc_offset, name_, reloc_offset, addend);
+                         break;
diff -Nru faumachine-20180503/debian/patches/02-new-iasl.patch 
faumachine-20180503/debian/patches/02-new-iasl.patch
--- faumachine-20180503/debian/patches/02-new-iasl.patch        1970-01-01 
01:00:00.000000000 +0100
+++ faumachine-20180503/debian/patches/02-new-iasl.patch        2018-08-03 
20:49:09.000000000 +0200
@@ -0,0 +1,44 @@
+Description: Adapt to changed iasl output
+Origin: Upstream, cdf517b9a4e9790240f0fb5833e944742dde35be
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902459
+Applied-Upstream: cdf517b9a4e9790240f0fb5833e944742dde35be
+
+diff --git a/roms/mb_ga_686dlx_bios/Makefile.am 
b/roms/mb_ga_686dlx_bios/Makefile.am
+index 10913863e..5e388a4f7 100644
+--- a/roms/mb_ga_686dlx_bios/Makefile.am
++++ b/roms/mb_ga_686dlx_bios/Makefile.am
+@@ -180,9 +180,13 @@ debug:
+ 
+ if HAVE_IASL
+ faum-dsdt.h: faum-dsdt.asl
+-      $(IASL) -p faum-dsdt -on -tc $<
+-      $(RM) faum-dsdt.aml
+-      mv faum-dsdt.hex $@
++      $(IASL) -p faumdsdt -on -tc $<
++      $(RM) faumdsdt.aml
++      sed \
++              -e 's/faumdsdt_aml_code/faum_dsdt/' \
++              -e 's/AmlCode/faum_dst/' \
++              < faumdsdt.hex > $@
++      $(RM) faumdsdt.hex
+ else
+ faum-dsdt.h: ./faum-dsdt.h.shipped
+       cp $< $@
+diff --git a/roms/mb_template_bios/acpi-tables.c 
b/roms/mb_template_bios/acpi-tables.c
+index 0f605fee2..4caca8350 100644
+--- a/roms/mb_template_bios/acpi-tables.c
++++ b/roms/mb_template_bios/acpi-tables.c
+@@ -92,12 +92,10 @@ struct acpi_dsdt {
+ /* 
+  * Include DSDT, generated by Intel ASL Compiler (iasl)
+  * iasl generates a "unsigned char AmlCode[]" in "faum-dsdt.h", which
+- * is renamed to faum_dsdt by the preprocessor.
++ * is renamed to faum_dsdt by using sed.
+  */
+-#define AmlCode faum_dsdt
+ static const
+ #include "faum-dsdt.h"
+-#undef AmlCode
+ 
+ /* Fixed ACPI Control Structure */
+ static const struct acpi_facs {
diff -Nru faumachine-20180503/debian/patches/series 
faumachine-20180503/debian/patches/series
--- faumachine-20180503/debian/patches/series   1970-01-01 01:00:00.000000000 
+0100
+++ faumachine-20180503/debian/patches/series   2018-08-03 20:50:08.000000000 
+0200
@@ -0,0 +1,2 @@
+01-handle-R_X86_64_PLT32.patch
+02-new-iasl.patch

Reply via email to