init/main.c:781: undefined reference to `___early_initcall_end'
Signed-off-by: Yoshinori Sato <[email protected]>
---
include/asm-generic/vmlinux.lds.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6d88a92..07b2784 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -362,7 +362,7 @@
#define INITCALLS \
*(.initcallearly.init) \
- __early_initcall_end = .; \
+ VMLINUX_SYMBOL(__early_initcall_end) = .; \
*(.initcall0.init) \
*(.initcall0s.init) \
*(.initcall1.init) \
--
1.5.6.3
--
Yoshinori Sato
<[email protected]>
On Wed, Jul 30, 2008 at 11:58 AM, Yoshinori Sato wrote:
> init/main.c:781: undefined reference to `___early_initcall_end'
>
> Signed-off-by: Yoshinori Sato <[email protected]>
>
> ---
> include/asm-generic/vmlinux.lds.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 6d88a92..07b2784 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -362,7 +362,7 @@
>
> #define INITCALLS \
> *(.initcallearly.init) \
> - __early_initcall_end = .; \
> + VMLINUX_SYMBOL(__early_initcall_end) = .; \
> *(.initcall0.init) \
> *(.initcall0s.init) \
> *(.initcall1.init) \
> --
> 1.5.6.3
nice catch, thanks ... looks like BUG_TABLE, TRACEDATA, and PERCPU are
also broken, but blackfin/etc... arent using those which is why we
havent noticed yet ...
-mike
At Wed, 30 Jul 2008 12:11:37 -0400,
Mike Frysinger wrote:
>
> On Wed, Jul 30, 2008 at 11:58 AM, Yoshinori Sato wrote:
> > init/main.c:781: undefined reference to `___early_initcall_end'
> >
> > Signed-off-by: Yoshinori Sato <[email protected]>
> >
> > ---
> > include/asm-generic/vmlinux.lds.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index 6d88a92..07b2784 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -362,7 +362,7 @@
> >
> > #define INITCALLS \
> > *(.initcallearly.init) \
> > - __early_initcall_end = .; \
> > + VMLINUX_SYMBOL(__early_initcall_end) = .; \
> > *(.initcall0.init) \
> > *(.initcall0s.init) \
> > *(.initcall1.init) \
> > --
> > 1.5.6.3
>
> nice catch, thanks ... looks like BUG_TABLE, TRACEDATA, and PERCPU are
> also broken, but blackfin/etc... arent using those which is why we
> havent noticed yet ...
> -mike
Thanks.
I fixed same.
Signed-off-by: Yoshinori Sato <[email protected]>
include/asm-generic/vmlinux.lds.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6d88a92..04cae96 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -333,9 +333,9 @@
#define BUG_TABLE \
. = ALIGN(8); \
__bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
- __start___bug_table = .; \
+ VMLINUX_SYMBOL(__start___bug_table) = .; \
*(__bug_table) \
- __stop___bug_table = .; \
+ VMLINUX_SYMBOL(__stop___bug_table) = .; \
}
#else
#define BUG_TABLE
@@ -345,9 +345,9 @@
#define TRACEDATA \
. = ALIGN(4); \
.tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
- __tracedata_start = .; \
+ VMLINUX_SYMBOL(__tracedata_start) = .; \
*(.tracedata) \
- __tracedata_end = .; \
+ VMLINUX_SYMBOL(__tracedata_end) = .; \
}
#else
#define TRACEDATA
@@ -362,7 +362,7 @@
#define INITCALLS \
*(.initcallearly.init) \
- __early_initcall_end = .; \
+ VMLINUX_SYMBOL(__early_initcall_end) = .; \
*(.initcall0.init) \
*(.initcall0s.init) \
*(.initcall1.init) \
@@ -383,9 +383,9 @@
#define PERCPU(align) \
. = ALIGN(align); \
- __per_cpu_start = .; \
+ VMLINUX_SYMBOL(__per_cpu_start) = .; \
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
*(.data.percpu) \
*(.data.percpu.shared_aligned) \
} \
- __per_cpu_end = .;
+ VMLINUX_SYMBOL(__per_cpu_end) = .;
--
1.5.6.3
--
Yoshinori Sato
<[email protected]>
On Wed, 30 Jul 2008 15:22:38 -0400
Yoshinori Sato <[email protected]> wrote:
> At Wed, 30 Jul 2008 12:11:37 -0400,
> Mike Frysinger wrote:
> >
> > On Wed, Jul 30, 2008 at 11:58 AM, Yoshinori Sato wrote:
> > > init/main.c:781: undefined reference to `___early_initcall_end'
> > >
> > > Signed-off-by: Yoshinori Sato <[email protected]>
> > >
> > > ---
> > > include/asm-generic/vmlinux.lds.h | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > > index 6d88a92..07b2784 100644
> > > --- a/include/asm-generic/vmlinux.lds.h
> > > +++ b/include/asm-generic/vmlinux.lds.h
> > > @@ -362,7 +362,7 @@
> > >
> > > #define INITCALLS \
> > > *(.initcallearly.init) \
> > > - __early_initcall_end = .; \
> > > + VMLINUX_SYMBOL(__early_initcall_end) = .; \
> > > *(.initcall0.init) \
> > > *(.initcall0s.init) \
> > > *(.initcall1.init) \
> > > --
> > > 1.5.6.3
> >
> > nice catch, thanks ... looks like BUG_TABLE, TRACEDATA, and PERCPU are
> > also broken, but blackfin/etc... arent using those which is why we
> > havent noticed yet ...
> > -mike
>
> Thanks.
> I fixed same.
>
> Signed-off-by: Yoshinori Sato <[email protected]>
>
> include/asm-generic/vmlinux.lds.h | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 6d88a92..04cae96 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -333,9 +333,9 @@
> #define BUG_TABLE \
> . = ALIGN(8); \
> __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
> - __start___bug_table = .; \
> + VMLINUX_SYMBOL(__start___bug_table) = .; \
> *(__bug_table) \
> - __stop___bug_table = .; \
> + VMLINUX_SYMBOL(__stop___bug_table) = .; \
> }
Sorry, but I haven't been following this topic very well and I rather
dislike plucking unchangelogged patches out of the middle of email
discussions.
If there's some patch which I should be applying then please resend it,
with a meaningful title, a description of what it does, etc.
Thanks.
Sorry.
I got error ARCH=h8300.
init/main.c:781: undefined reference to `___early_initcall_end'
Same problem have
__start___bug_table
__stop___bug_table
__tracedata_start
__tracedata_end
__per_cpu_start
__per_cpu_end
If define symbol in vmlinux.lds, Use VMLINUX_SYMBOL macro.
VMLINUX_SYMBOL is add prefix charactor.
Signed-off-by: Yoshinori Sato <[email protected]>
---
include/asm-generic/vmlinux.lds.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6d88a92..04cae96 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -333,9 +333,9 @@
#define BUG_TABLE \
. = ALIGN(8); \
__bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
- __start___bug_table = .; \
+ VMLINUX_SYMBOL(__start___bug_table) = .; \
*(__bug_table) \
- __stop___bug_table = .; \
+ VMLINUX_SYMBOL(__stop___bug_table) = .; \
}
#else
#define BUG_TABLE
@@ -345,9 +345,9 @@
#define TRACEDATA \
. = ALIGN(4); \
.tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
- __tracedata_start = .; \
+ VMLINUX_SYMBOL(__tracedata_start) = .; \
*(.tracedata) \
- __tracedata_end = .; \
+ VMLINUX_SYMBOL(__tracedata_end) = .; \
}
#else
#define TRACEDATA
@@ -362,7 +362,7 @@
#define INITCALLS \
*(.initcallearly.init) \
- __early_initcall_end = .; \
+ VMLINUX_SYMBOL(__early_initcall_end) = .; \
*(.initcall0.init) \
*(.initcall0s.init) \
*(.initcall1.init) \
@@ -383,9 +383,9 @@
#define PERCPU(align) \
. = ALIGN(align); \
- __per_cpu_start = .; \
+ VMLINUX_SYMBOL(__per_cpu_start) = .; \
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
*(.data.percpu) \
*(.data.percpu.shared_aligned) \
} \
- __per_cpu_end = .;
+ VMLINUX_SYMBOL(__per_cpu_end) = .;
--
1.5.6.3
--
Yoshinori Sato
<[email protected]>
On Wed, 30 Jul 2008 20:26:24 -0400 Yoshinori Sato <[email protected]> wrote:
> Sorry.
>
> I got error ARCH=h8300.
> init/main.c:781: undefined reference to `___early_initcall_end'
>
> Same problem have
> __start___bug_table
> __stop___bug_table
> __tracedata_start
> __tracedata_end
> __per_cpu_start
> __per_cpu_end
>
> If define symbol in vmlinux.lds, Use VMLINUX_SYMBOL macro.
> VMLINUX_SYMBOL is add prefix charactor.
>
> Signed-off-by: Yoshinori Sato <[email protected]>
>
> ---
> include/asm-generic/vmlinux.lds.h | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 6d88a92..04cae96 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -333,9 +333,9 @@
> #define BUG_TABLE \
> . = ALIGN(8); \
> __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
> - __start___bug_table = .; \
> + VMLINUX_SYMBOL(__start___bug_table) = .; \
> *(__bug_table) \
> - __stop___bug_table = .; \
> + VMLINUX_SYMBOL(__stop___bug_table) = .; \
> }
> #else
> #define BUG_TABLE
Strange. The code you're fixing there was added by
commit 7664c5a1da4711bb6383117f51b94c8dc8f3f1cd
Author: Jeremy Fitzhardinge <[email protected]>
Date: Fri Dec 8 02:36:19 2006 -0800
[PATCH] Generic BUG implementation
over a year ago. I doubt if h8300 has been broken for that long, so
something else must have triggered this failure.
Do you know what it was?
At Wed, 30 Jul 2008 19:06:59 -0700,
Andrew Morton wrote:
>
> On Wed, 30 Jul 2008 20:26:24 -0400 Yoshinori Sato <[email protected]> wrote:
>
> > Sorry.
> >
> > I got error ARCH=h8300.
> > init/main.c:781: undefined reference to `___early_initcall_end'
> >
> > Same problem have
> > __start___bug_table
> > __stop___bug_table
> > __tracedata_start
> > __tracedata_end
> > __per_cpu_start
> > __per_cpu_end
> >
> > If define symbol in vmlinux.lds, Use VMLINUX_SYMBOL macro.
> > VMLINUX_SYMBOL is add prefix charactor.
> >
> > Signed-off-by: Yoshinori Sato <[email protected]>
> >
> > ---
> > include/asm-generic/vmlinux.lds.h | 14 +++++++-------
> > 1 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index 6d88a92..04cae96 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -333,9 +333,9 @@
> > #define BUG_TABLE \
> > . = ALIGN(8); \
> > __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
> > - __start___bug_table = .; \
> > + VMLINUX_SYMBOL(__start___bug_table) = .; \
> > *(__bug_table) \
> > - __stop___bug_table = .; \
> > + VMLINUX_SYMBOL(__stop___bug_table) = .; \
> > }
> > #else
> > #define BUG_TABLE
>
> Strange. The code you're fixing there was added by
>
> commit 7664c5a1da4711bb6383117f51b94c8dc8f3f1cd
> Author: Jeremy Fitzhardinge <[email protected]>
> Date: Fri Dec 8 02:36:19 2006 -0800
>
> [PATCH] Generic BUG implementation
>
>
> over a year ago. I doubt if h8300 has been broken for that long, so
> something else must have triggered this failure.
>
> Do you know what it was?
I don't know.
Check it.
--
Yoshinori Sato
<[email protected]>
On Wed, Jul 30, 2008 at 4:01 PM, Andrew Morton wrote:
> On Wed, 30 Jul 2008 15:22:38 -0400 Yoshinori Sato wrote:
>> At Wed, 30 Jul 2008 12:11:37 -0400 Mike Frysinger wrote:
>> > On Wed, Jul 30, 2008 at 11:58 AM, Yoshinori Sato wrote:
>> > > init/main.c:781: undefined reference to `___early_initcall_end'
>> > >
>> > > Signed-off-by: Yoshinori Sato <[email protected]>
>> > >
>> > > ---
>> > > include/asm-generic/vmlinux.lds.h | 2 +-
>> > > 1 files changed, 1 insertions(+), 1 deletions(-)
>> > >
>> > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
>> > > index 6d88a92..07b2784 100644
>> > > --- a/include/asm-generic/vmlinux.lds.h
>> > > +++ b/include/asm-generic/vmlinux.lds.h
>> > > @@ -362,7 +362,7 @@
>> > >
>> > > #define INITCALLS \
>> > > *(.initcallearly.init) \
>> > > - __early_initcall_end = .; \
>> > > + VMLINUX_SYMBOL(__early_initcall_end) = .; \
>> > > *(.initcall0.init) \
>> > > *(.initcall0s.init) \
>> > > *(.initcall1.init) \
>> > > --
>> > > 1.5.6.3
>> >
>> > nice catch, thanks ... looks like BUG_TABLE, TRACEDATA, and PERCPU are
>> > also broken, but blackfin/etc... arent using those which is why we
>> > havent noticed yet ...
>> > -mike
>>
>> Thanks.
>> I fixed same.
>>
>> Signed-off-by: Yoshinori Sato <[email protected]>
>>
>> include/asm-generic/vmlinux.lds.h | 14 +++++++-------
>> 1 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
>> index 6d88a92..04cae96 100644
>> --- a/include/asm-generic/vmlinux.lds.h
>> +++ b/include/asm-generic/vmlinux.lds.h
>> @@ -333,9 +333,9 @@
>> #define BUG_TABLE \
>> . = ALIGN(8); \
>> __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
>> - __start___bug_table = .; \
>> + VMLINUX_SYMBOL(__start___bug_table) = .; \
>> *(__bug_table) \
>> - __stop___bug_table = .; \
>> + VMLINUX_SYMBOL(__stop___bug_table) = .; \
>> }
>
> Sorry, but I haven't been following this topic very well and I rather
> dislike plucking unchangelogged patches out of the middle of email
> discussions.
>
> If there's some patch which I should be applying then please resend it,
> with a meaningful title, a description of what it does, etc.
i thought the fix was self-evident ;)
you cant just use straight symbol names in common header files as they
dont take into consideration weird arch-specific ABI conventions. in
the case of Blackfin/h8300, the ABI dictates that any C-visible
symbols have an underscore prefixed to them. thus all symbols in
vmlinux.lds.h need to be wrapped in VMLINUX_SYMBOL() so that each arch
can put hide this magic in their own files.
-mike
On Wed, 30 Jul 2008 23:26:47 -0400 "Mike Frysinger" <[email protected]> wrote:
> you cant just use straight symbol names in common header files as they
> dont take into consideration weird arch-specific ABI conventions. in
> the case of Blackfin/h8300, the ABI dictates that any C-visible
> symbols have an underscore prefixed to them. thus all symbols in
> vmlinux.lds.h need to be wrapped in VMLINUX_SYMBOL() so that each arch
> can put hide this magic in their own files.
ooh, a changelog.
This seems to be a pretty common failing. I just had to fix the same
problem in a linux-next patch:
diff -puN include/asm-generic/vmlinux.lds.h~zero-based-percpu-use-vmlinux_symbol-in-include-asm-generic-vmlinuxldsh include/asm-generic/vmlinux.lds.h
--- a/include/asm-generic/vmlinux.lds.h~zero-based-percpu-use-vmlinux_symbol-in-include-asm-generic-vmlinuxldsh
+++ a/include/asm-generic/vmlinux.lds.h
@@ -385,15 +385,15 @@
#define PERCPU(align) \
. = ALIGN(align); \
percpu : { } :percpu \
- __per_cpu_load = .; \
- .data.percpu 0 : AT(__per_cpu_load - LOAD_OFFSET) { \
+ VMLINUX_SYMBOL(__per_cpu_load) = .; \
+ .data.percpu 0 : AT(VMLINUX_SYMBOL(__per_cpu_load) - LOAD_OFFSET) { \
*(.data.percpu.first) \
*(.data.percpu.shared_aligned) \
*(.data.percpu) \
*(.data.percpu.page_aligned) \
- ____per_cpu_size = .; \
+ VMLINUX_SYMBOL(____per_cpu_size) = .; \
} \
- . = __per_cpu_load + ____per_cpu_size; \
+ . = VMLINUX_SYMBOL(__per_cpu_load) + VMLINUX_SYMBOL(____per_cpu_size); \
data : { } :data
#else
#define PERCPU(align) \
_
(haven't tested it yet).
It's going to keep happening too, unless we find some way of making x86
break when people forget to use VMLINUX_SYMBOL().
On Wed, Jul 30, 2008 at 11:37 PM, Andrew Morton wrote:
> On Wed, 30 Jul 2008 23:26:47 -0400 "Mike Frysinger" wrote:
>> you cant just use straight symbol names in common header files as they
>> dont take into consideration weird arch-specific ABI conventions. in
>> the case of Blackfin/h8300, the ABI dictates that any C-visible
>> symbols have an underscore prefixed to them. thus all symbols in
>> vmlinux.lds.h need to be wrapped in VMLINUX_SYMBOL() so that each arch
>> can put hide this magic in their own files.
>
> ooh, a changelog.
>
> This seems to be a pretty common failing. I just had to fix the same
> problem in a linux-next patch:
PERCPU is broken in mainline currently as well ... but it looks like
there's extended stuff in linux-next now
> It's going to keep happening too, unless we find some way of making x86
> break when people forget to use VMLINUX_SYMBOL().
i pondered it briefly when i saw Yoshinori's original e-mail, but
nothing pretty came to mind
-mike