Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd593d12 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Andi Kleen
Browse files

[PATCH] relocatable kernel: Kallsyms generate relocatable symbols



Print the addresses of non-absolute symbols relative to _text
so that ld will generate relocations.  Allowing a relocatable
kernel to relocate them.  We can't actually use the symbol names
because kallsyms includes static symbols that are not exported
from their object files.

Add the _text symbol definitions to the architectures which don't
define it otherwise linker will fail.

Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 2a43f3ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ SECTIONS
#endif
        .text :
	{
	_text = .;
#if defined(CONFIG_ROMKERNEL)
	*(.int_redirect)
#endif
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ SECTIONS {
#endif

	.text : {
		_text = .;
		_stext = . ;
        	*(.text)
		SCHED_TEXT
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ SECTIONS

	/* Text and gots */
	.text : {
		_text = .;
		*(.text .text.*)
		SCHED_TEXT
		LOCK_TEXT
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ SECTIONS
  .plt : { *(.plt) }
  .text      :
  {
    _text = .;
    *(.text)
    SCHED_TEXT
    LOCK_TEXT
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ SECTIONS
  . = 0x10000 + SIZEOF_HEADERS;
  .text 0xf0004000 :
  {
    _text = .;
    *(.text)
    SCHED_TEXT
    LOCK_TEXT
Loading