Thread (40 messages) 40 messages, 5 authors, 2016-08-08

Re: [PATCH v3 19/21] powerpc: Add option to use jump label for mmu_has_feature()

From: Anton Blanchard <hidden>
Date: 2016-08-08 07:35:18

Hi,
This patch causes an oops when building with the gold linker:
Found the problem. On binutils .meminit.text is within _stext/_etext:

  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 3] .meminit.text     PROGBITS        c000000000989d14 999d14 00225c 00  AX  0   0  4

c000000000990000 R _etext

But on gold it is not:

c000000000970000 A _etext

  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 3] .meminit.text     PROGBITS        c000000000970bcc 980bcc 002220 00  AX  0   0  4

As a result kernel_text_address() returns false, and
__jump_label_update() fails to update:

    if (entry->code && kernel_text_address(entry->code))
            arch_jump_label_transform(entry, jump_label_type(entry));

Seems like we get the correct layout on binutils by luck and we
need to explicitly handle .meminit.text.

Anton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help