From: Sebastian Siewior <lkml@ml.breakpoint.cc>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Ungerer <gerg@snapgear.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
gerg@uclinux.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68knommu: missing sections for linker script
Date: Mon, 12 May 2008 01:03:21 +0200 [thread overview]
Message-ID: <20080511230321.GA20157@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20080511004107.GA2675@uranus.ravnborg.org>
* Sam Ravnborg | 2008-05-11 02:41:07 [+0200]:
>Any specific reasons why m68knommu does
>not use include/asm-generic/vmlinux-lds.h?
Yes, binutils syntax. I made a patch that changes vmlinux-lds a little
to make it work with the generic one. I posted it to uclinux ml and wait
for Greg's feedback (whether here is fine with this approach). I can
recall that he wanted to use the generic if possible. Here is the patch
so you drop an eye on it.
>
> Sam
Sebastian
---
From: Sebastian Siewior <bigeasy@linutronix.de>
Subject: [PATCH] generic: add OUTPUT_DATA_SECTION to vmlinux.lds.h
the m68k compiler requires an information in which memory location
this section belongs. Something like
| .data DATA_ADDR : {
| . = ALIGN(4);
| _sdata = . ;
| DATA_DATA
| . = ALIGN(8192) ;
| *(.data.init_task)
| _edata = . ;
| } > DATA
|
is used where DATA is defined as something like
| MEMORY {
| DATA : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
| }
and RAM_START & RAM_LENGTH is comming from Kconfig and describes
the memory.
With this patch the arch specific vmlinux.lds.S could get a little
smaller and requires less updates cycles (after adding new section
to the kernel).
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
---
include/asm-generic/vmlinux.lds.h | 43 ++++++++++++++++++++----------------
1 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f054778..4f1feae 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -6,6 +6,10 @@
#define VMLINUX_SYMBOL(_sym_) _sym_
#endif
+#ifndef OUTPUT_DATA_SECTION
+#define OUTPUT_DATA_SECTION
+#endif
+
/* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8)
@@ -61,11 +65,11 @@
*(.rodata) *(.rodata.*) \
*(__vermagic) /* Kernel version magic */ \
*(__markers_strings) /* Markers: strings */ \
- } \
+ } OUTPUT_DATA_SECTION \
\
.rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
*(.rodata1) \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* PCI quirks */ \
.pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
@@ -84,89 +88,89 @@
VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
*(.pci_fixup_resume) \
VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* RapidIO route ops */ \
.rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rio_route_ops) = .; \
*(.rio_route_ops) \
VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab) = .; \
*(__ksymtab) \
VMLINUX_SYMBOL(__stop___ksymtab) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-only symbols */ \
__ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
*(__ksymtab_gpl) \
VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: Normal unused symbols */ \
__ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
*(__ksymtab_unused) \
VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-only unused symbols */ \
__ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
*(__ksymtab_unused_gpl) \
VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-future-only symbols */ \
__ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
*(__ksymtab_gpl_future) \
VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: Normal symbols */ \
__kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___kcrctab) = .; \
*(__kcrctab) \
VMLINUX_SYMBOL(__stop___kcrctab) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-only symbols */ \
__kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
*(__kcrctab_gpl) \
VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: Normal unused symbols */ \
__kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \
*(__kcrctab_unused) \
VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-only unused symbols */ \
__kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
*(__kcrctab_unused_gpl) \
VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: GPL-future-only symbols */ \
__kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
*(__kcrctab_gpl_future) \
VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
*(__ksymtab_strings) \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* __*init sections */ \
__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
@@ -177,7 +181,7 @@
CPU_KEEP(exit.rodata) \
MEM_KEEP(init.rodata) \
MEM_KEEP(exit.rodata) \
- } \
+ } OUTPUT_DATA_SECTION \
\
/* Built-in module parameters. */ \
__param : AT(ADDR(__param) - LOAD_OFFSET) { \
@@ -186,7 +190,8 @@
VMLINUX_SYMBOL(__stop___param) = .; \
. = ALIGN((align)); \
VMLINUX_SYMBOL(__end_rodata) = .; \
- } \
+ } OUTPUT_DATA_SECTION \
+ \
. = ALIGN((align));
/* RODATA provided for backward compatibility.
@@ -316,7 +321,7 @@
__start___bug_table = .; \
*(__bug_table) \
__stop___bug_table = .; \
- }
+ } OUTPUT_DATA_SECTION
#define NOTES \
.notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
@@ -350,5 +355,5 @@
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
*(.data.percpu) \
*(.data.percpu.shared_aligned) \
- } \
+ } OUTPUT_DATA_SECTION \
__per_cpu_end = .;
--
1.5.4.3
next prev parent reply other threads:[~2008-05-11 23:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 0:52 Greg Ungerer
2008-05-11 0:41 ` Sam Ravnborg
2008-05-11 23:03 ` Sebastian Siewior [this message]
2008-06-07 11:03 ` Sam Ravnborg
2008-05-12 5:22 ` Greg Ungerer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080511230321.GA20157@Chamillionaire.breakpoint.cc \
--to=lkml@ml.breakpoint.cc \
--cc=akpm@linux-foundation.org \
--cc=gerg@snapgear.com \
--cc=gerg@uclinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®