* [PATCH 1/2] FRV: Add missing linux/export.h to arch PCI dma implementations
@ 2011-12-15 11:11 David Howells
2011-12-15 11:11 ` [PATCH 2/2] FRV: Remove the .gnu.build-id note when producing the loadable image David Howells
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2011-12-15 11:11 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel, David Howells
Add missing linux/export.h to arch PCI dma implementations so that
EXPORT_SYMBOL() is correctly handled.
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/frv/mb93090-mb00/pci-dma-nommu.c | 1 +
arch/frv/mb93090-mb00/pci-dma.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c
index e47857f..42ed284 100644
--- a/arch/frv/mb93090-mb00/pci-dma-nommu.c
+++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c
@@ -9,6 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
+#include <linux/export.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c
index 41098a3..be0916d 100644
--- a/arch/frv/mb93090-mb00/pci-dma.c
+++ b/arch/frv/mb93090-mb00/pci-dma.c
@@ -9,6 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
+#include <linux/export.h>
#include <linux/types.h>
#include <linux/dma-mapping.h>
#include <linux/list.h>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] FRV: Remove the .gnu.build-id note when producing the loadable image
2011-12-15 11:11 [PATCH 1/2] FRV: Add missing linux/export.h to arch PCI dma implementations David Howells
@ 2011-12-15 11:11 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2011-12-15 11:11 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel, David Howells
Remove the .gnu.build-id note when producing the loadable image as this is
marked Allocatable in the ELF section table and is marked as being loaded at
address 0 if the linker is recent enough to generate it:
[ 1] .note.gnu.build-i NOTE 00000000 004000 000024 00 A 0 0 4
This is a problem for objcopying the vmlinux file to the loadable image file as
the objcopy -O binary starts writing the file from the base address of the
lowest entry in the ELF program headers table:
LOAD 0x004000 0x00000000 0x00000000 0x00024 0x00024 R 0x4000
LOAD 0x008000 0xc0000000 0xc0000000 0x2a6138 0x2c9e8c RWE 0x4000
NOTE 0x004000 0x00000000 0x00000000 0x00024 0x00024 R 0x4
The kernel actually resides at 0xc0000000 and so objcopy pads the output file
between the note (at 0) and the kernel, resulting in a 3.3GB file - which
confuses things like TFTP and RedBoot (when loading raw binary data).
The old linker - which doesn't produce this note - shows this:
LOAD 0x001000 0xc0000000 0xc0000000 0x2aa260 0x2aaa54 RWE 0x1000
LOAD 0x2ab000 0xc02ac000 0xc02ac000 0x00000 0x21d8c RW 0x1000
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/frv/boot/Makefile | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile
index 6ae3254..6359c49 100644
--- a/arch/frv/boot/Makefile
+++ b/arch/frv/boot/Makefile
@@ -31,19 +31,21 @@ Image: $(obj)/Image
targets: $(obj)/Image
+REMOVE_SECTIONS := -R .note -R .comment -R .note.gnu.build-id
+
$(obj)/Image: vmlinux FORCE
- $(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@
+ $(OBJCOPY) -O binary $(REMOVE_SECTIONS) -S vmlinux $@
#$(obj)/Image: $(CONFIGURE) $(SYSTEM)
-# $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@
+# $(OBJCOPY) -O binary $(REMOVE_SECTIONS) -g -S $(SYSTEM) $@
bzImage: zImage
zImage: $(CONFIGURE) compressed/$(LINUX)
- $(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@
+ $(OBJCOPY) -O binary $(REMOVE_SECTIONS) -S compressed/$(LINUX) $@
bootpImage: bootp/bootp
- $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@
+ $(OBJCOPY) -O binary $(REMOVE_SECTIONS) -S bootp/bootp $@
compressed/$(LINUX): $(LINUX) dep
@$(MAKE) -C compressed $(LINUX)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-15 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 11:11 [PATCH 1/2] FRV: Add missing linux/export.h to arch PCI dma implementations David Howells
2011-12-15 11:11 ` [PATCH 2/2] FRV: Remove the .gnu.build-id note when producing the loadable image David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®