You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-libs/libsmbios/files/libsmbios-fix-pie.patch

30 lines
816 B

--- libsmbios-2.2.19/src/bin/dellMediaDirectCtl.cpp
+++ libsmbios-2.2.19/src/bin/dellMediaDirectCtl.cpp
@@ -183,16 +183,21 @@
{
iopl(3);
+ u32 tmpebx;
__asm__ __volatile__ (
- // magic port
- "outb %%al, %%dx \n\t"
-
+ "movl %%ebx,%[tmpebx]\n\t"
+ "movl %[ebx],%%ebx\n\t"
+ // magic port
+ "outb %%al, %%dx \n\t"
+ "movl %%ebx,%[ebx]\n\t"
+ "movl %[tmpebx],%%ebx\n\t"
: /* output args */
"=a" (r->eax),
- "=b" (r->ebx),
+ [ebx] "=rm" (r->ebx),
"=c" (r->ecx),
"=S" (r->esi),
- "=D" (r->edi)
+ "=D" (r->edi),
+ [tmpebx] "+m" (tmpebx)
: /* input args */
"0" (r->eax),
"1" (r->ebx),