Skip to content

Commit

Permalink
xtensa: replace xtensa-specific _f{data,text} by _s{data,text}
Browse files Browse the repository at this point in the history
commit a2d063a ("extable, core_kernel_data(): Make sure all archs
define _sdata") missed xtensa.  Xtensa does have a start of data marker,
but calls it _fdata, causing

    kernel/built-in.o:(.text+0x964): undefined reference to `_sdata'

_stext was already defined, but it was duplicated by _fdata.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Chris Zankel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
geertu authored and torvalds committed Jun 20, 2012
1 parent 3a981f4 commit 5e7b6ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ SECTIONS

_text = .;
_stext = .;
_ftext = .;

.text :
{
Expand Down Expand Up @@ -112,7 +111,7 @@ SECTIONS
EXCEPTION_TABLE(16)
/* Data section */

_fdata = .;
_sdata = .;
RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
6 changes: 3 additions & 3 deletions arch/xtensa/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/* References to section boundaries */

extern char _ftext, _etext, _fdata, _edata, _rodata_end;
extern char _stext, _etext, _sdata, _edata, _rodata_end;
extern char __init_begin, __init_end;

/*
Expand Down Expand Up @@ -197,8 +197,8 @@ void __init mem_init(void)
reservedpages++;
}

codesize = (unsigned long) &_etext - (unsigned long) &_ftext;
datasize = (unsigned long) &_edata - (unsigned long) &_fdata;
codesize = (unsigned long) &_etext - (unsigned long) &_stext;
datasize = (unsigned long) &_edata - (unsigned long) &_sdata;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;

printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
Expand Down

0 comments on commit 5e7b6ed

Please sign in to comment.