diff options
| -rw-r--r-- | meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch | 40 | ||||
| -rw-r--r-- | meta/recipes-bsp/grub/grub_0.97.bb | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch new file mode 100644 index 0000000000..bd8e0a89fc --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | |||
| 2 | This patch is from ubuntu: | ||
| 3 | * objcopy-absolute.diff (update): Remove .note, .comment, and | ||
| 4 | .note.gnu.build-id sections from images (LP: #444703). | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [no longer maintained] | ||
| 7 | |||
| 8 | Index: b/acinclude.m4 | ||
| 9 | =================================================================== | ||
| 10 | --- a/acinclude.m4 | ||
| 11 | +++ b/acinclude.m4 | ||
| 12 | @@ -61,7 +61,7 @@ | ||
| 13 | else | ||
| 14 | AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) | ||
| 15 | fi | ||
| 16 | - if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then : | ||
| 17 | + if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then : | ||
| 18 | else | ||
| 19 | AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files]) | ||
| 20 | fi | ||
| 21 | Index: b/stage1/Makefile.am | ||
| 22 | =================================================================== | ||
| 23 | --- a/stage1/Makefile.am | ||
| 24 | +++ b/stage1/Makefile.am | ||
| 25 | @@ -12,4 +12,4 @@ | ||
| 26 | |||
| 27 | SUFFIXES = .exec | ||
| 28 | .exec: | ||
| 29 | - $(OBJCOPY) -O binary $< $@ | ||
| 30 | + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ | ||
| 31 | Index: b/stage2/Makefile.am | ||
| 32 | =================================================================== | ||
| 33 | --- a/stage2/Makefile.am | ||
| 34 | +++ b/stage2/Makefile.am | ||
| 35 | @@ -293,4 +293,4 @@ | ||
| 36 | # General rule for making a raw binary. | ||
| 37 | SUFFIXES = .exec | ||
| 38 | .exec: | ||
| 39 | - $(OBJCOPY) -O binary $< $@ | ||
| 40 | + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ | ||
diff --git a/meta/recipes-bsp/grub/grub_0.97.bb b/meta/recipes-bsp/grub/grub_0.97.bb index 5ba1a08499..6971193378 100644 --- a/meta/recipes-bsp/grub/grub_0.97.bb +++ b/meta/recipes-bsp/grub/grub_0.97.bb | |||
| @@ -16,6 +16,7 @@ SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \ | |||
| 16 | file://no-reorder-functions.patch \ | 16 | file://no-reorder-functions.patch \ |
| 17 | file://autohell.patch \ | 17 | file://autohell.patch \ |
| 18 | file://grub_fix_for_automake-1.12.patch \ | 18 | file://grub_fix_for_automake-1.12.patch \ |
| 19 | file://objcopy-absolute.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 21 | SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884" | 22 | SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884" |
