Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 195840 Details for
Bug 139277
sys-boot/grub-0.97 - pci.c:143: error: can't find a register in class `BREG' while reloading `asm'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
grub-0.97-pie-safety.patch
grub-0.97-pie-safety.patch (text/plain), 5.03 KB, created by
Robin Johnson
on 2009-06-26 23:11:55 UTC
(
hide
)
Description:
grub-0.97-pie-safety.patch
Filename:
MIME Type:
Creator:
Robin Johnson
Created:
2009-06-26 23:11:55 UTC
Size:
5.03 KB
patch
obsolete
>Make GRUB PIE-safe. > >Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> > >diff -Nuar -Nuar --exclude '*o' --exclude config.log --exclude '*.exec' --exclude '*[0-9]' --exclude '*.a' --exclude mbchk --exclude Makefile --exclude config.status -wBb grub-0.97.orig/netboot/pci.c grub-0.97/netboot/pci.c >--- grub-0.97.orig/netboot/pci.c 2003-07-09 11:45:38.000000000 +0000 >+++ grub-0.97/netboot/pci.c 2009-06-26 22:02:15.000000000 +0000 >@@ -105,13 +105,16 @@ > > save_flags(flags); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK >- "lcall (%%edi)" >+ "lcall (%%edi)\n\t" > #else >- "lcall *(%%edi)" >+ "lcall *(%%edi)\n\t" > #endif >+ "movl %%ebx, %1\n\t" /* capture what was in %ebx */ >+ "popl %%ebx\n\t" /* restore %ebx */ > : "=a" (return_code), >- "=b" (address), >+ "=r" (address), > "=c" (length), > "=d" (entry) > : "0" (service), >@@ -141,18 +144,21 @@ > > save_flags(flags); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=c" (*value), > "=a" (ret) > : "1" (PCIBIOS_READ_CONFIG_BYTE), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -168,18 +174,21 @@ > > save_flags(flags); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=c" (*value), > "=a" (ret) > : "1" (PCIBIOS_READ_CONFIG_WORD), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -195,18 +204,21 @@ > > save_flags(flags); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=c" (*value), > "=a" (ret) > : "1" (PCIBIOS_READ_CONFIG_DWORD), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -222,18 +234,21 @@ > > save_flags(flags); cli(); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=a" (ret) > : "0" (PCIBIOS_WRITE_CONFIG_BYTE), > "c" (value), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -249,18 +264,21 @@ > > save_flags(flags); cli(); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=a" (ret) > : "0" (PCIBIOS_WRITE_CONFIG_WORD), > "c" (value), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -276,18 +294,21 @@ > > save_flags(flags); cli(); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ >+ "movl %3, %%ebx\n\t" /* put the value into ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%esi)\n\t" > #else > "lcall *(%%esi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "popl %%ebx\n\t" /* restore %ebx */ >+ "xor %%ah, %%ah\n\t" > "1:" > : "=a" (ret) > : "0" (PCIBIOS_WRITE_CONFIG_DWORD), > "c" (value), >- "b" (bx), >+ "r" (bx), > "D" ((long) where), > "S" (&pci_indirect)); > restore_flags(flags); >@@ -308,20 +329,22 @@ > > save_flags(flags); > __asm__( >+ "pushl %%ebx\n\t" /* save %ebx */ > #ifdef ABSOLUTE_WITHOUT_ASTERISK > "lcall (%%edi)\n\t" > #else > "lcall *(%%edi)\n\t" > #endif > "jc 1f\n\t" >- "xor %%ah, %%ah\n" >+ "xor %%ah, %%ah\n\t" > "1:\tshl $8, %%eax\n\t" >- "movw %%bx, %%ax" >+ "movw %%bx, %%ax\n\t" >+ "popl %%ebx\n\t" /* restore %ebx */ > : "=d" (signature), > "=a" (pack) > : "1" (PCIBIOS_PCI_BIOS_PRESENT), > "D" (&pci_indirect) >- : "bx", "cx"); >+ : "cx"); > restore_flags(flags); > > present_status = (pack >> 16) & 0xff;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 139277
:
106175
| 195840 |
197595