* Re: "." in vmlinux.lds.S [not found] <CACkGtriM1jwP9OSED21mNrKWPubeJp9YjL-8uetLqhjqfoH=Lg@mail.gmail.com> @ 2014-06-06 17:08 ` Hán Shěn (沈涵) 2014-06-06 18:40 ` Andy Lutomirski 0 siblings, 1 reply; 5+ messages in thread From: Hán Shěn (沈涵) @ 2014-06-06 17:08 UTC (permalink / raw) To: linux-kernel A gentle ping? On Tue, Jun 3, 2014 at 2:46 PM, Hán Shěn (沈涵) <shenhan@google.com> wrote: > Hi we are trying to boot up a x86_64 chrome book using binutils 2.24 and > kernel 3.8, but failed. > > After some triage work, we found that a 2-year-old binutil CL changed the > interpretation of "." in linker script (short story: absolute -> relative, > long story: https://sourceware.org/ml/binutils/2012-06/msg00155.html). > > After some further work, we are able to boot the kernel with a kernel patch > pasted at EOM. I am curious, why the upstream kernel is never hit by this > behavior? We enabled "CONFIG_DEBUG_RODATA", so we were hit, is this some > macro not usually turned on? > > Patch here ---- > diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S > index d329fc4..d5dc570 100644 > --- a/arch/x86/kernel/vmlinux.lds.S > +++ b/arch/x86/kernel/vmlinux.lds.S > @@ -58,7 +58,7 @@ jiffies_64 = jiffies; > > #define X64_ALIGN_DEBUG_RODATA_END \ > . = ALIGN(HPAGE_SIZE); \ > - __end_rodata_hpage_align = .; > + __end_rodata_hpage_align = ABSOLUTE(.); > > #else > > @@ -159,7 +159,7 @@ SECTIONS > #ifdef CONFIG_X86_64 > > . = ALIGN(PAGE_SIZE); > - __vvar_page = .; > + __vvar_page = ABSOLUTE(.); > > .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) { > /* work around gold bug 13023 */ > @@ -325,7 +325,7 @@ SECTIONS > __brk_limit = .; > } > > - _end = .; > + _end = ABSOLUTE(.); > > STABS_DEBUG > DWARF_DEBUG > -- Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "." in vmlinux.lds.S 2014-06-06 17:08 ` "." in vmlinux.lds.S Hán Shěn (沈涵) @ 2014-06-06 18:40 ` Andy Lutomirski 2014-06-06 18:53 ` Hán Shěn (沈涵) 0 siblings, 1 reply; 5+ messages in thread From: Andy Lutomirski @ 2014-06-06 18:40 UTC (permalink / raw) To: "Hán Shěn (沈涵)", linux-kernel On 06/06/2014 10:08 AM, Hán Shěn (沈涵) wrote: > A gentle ping? > > On Tue, Jun 3, 2014 at 2:46 PM, Hán Shěn (沈涵) <shenhan@google.com> wrote: >> Hi we are trying to boot up a x86_64 chrome book using binutils 2.24 and >> kernel 3.8, but failed. >> >> After some triage work, we found that a 2-year-old binutil CL changed the >> interpretation of "." in linker script (short story: absolute -> relative, >> long story: https://sourceware.org/ml/binutils/2012-06/msg00155.html). >> >> After some further work, we are able to boot the kernel with a kernel patch >> pasted at EOM. I am curious, why the upstream kernel is never hit by this >> behavior? We enabled "CONFIG_DEBUG_RODATA", so we were hit, is this some >> macro not usually turned on? What does a section-relative symbol do? --Andy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "." in vmlinux.lds.S 2014-06-06 18:40 ` Andy Lutomirski @ 2014-06-06 18:53 ` Hán Shěn (沈涵) 2014-06-06 19:08 ` Andy Lutomirski 0 siblings, 1 reply; 5+ messages in thread From: Hán Shěn (沈涵) @ 2014-06-06 18:53 UTC (permalink / raw) To: Andy Lutomirski; +Cc: linux-kernel Yeah, the symbol "__end_rodata_hpage_align" is defined as absolute in older binutils, the newer binutils making it relative seems meaningless in this context. On Fri, Jun 6, 2014 at 11:40 AM, Andy Lutomirski <luto@amacapital.net> wrote: > On 06/06/2014 10:08 AM, Hán Shěn (沈涵) wrote: >> A gentle ping? >> >> On Tue, Jun 3, 2014 at 2:46 PM, Hán Shěn (沈涵) <shenhan@google.com> wrote: >>> Hi we are trying to boot up a x86_64 chrome book using binutils 2.24 and >>> kernel 3.8, but failed. >>> >>> After some triage work, we found that a 2-year-old binutil CL changed the >>> interpretation of "." in linker script (short story: absolute -> relative, >>> long story: https://sourceware.org/ml/binutils/2012-06/msg00155.html). >>> >>> After some further work, we are able to boot the kernel with a kernel patch >>> pasted at EOM. I am curious, why the upstream kernel is never hit by this >>> behavior? We enabled "CONFIG_DEBUG_RODATA", so we were hit, is this some >>> macro not usually turned on? > > What does a section-relative symbol do? > > --Andy -- Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "." in vmlinux.lds.S 2014-06-06 18:53 ` Hán Shěn (沈涵) @ 2014-06-06 19:08 ` Andy Lutomirski 2014-06-06 20:45 ` Hán Shěn (沈涵) 0 siblings, 1 reply; 5+ messages in thread From: Andy Lutomirski @ 2014-06-06 19:08 UTC (permalink / raw) To: Hán Shěn (沈涵) Cc: linux-kernel@vger.kernel.org, X86 ML On Fri, Jun 6, 2014 at 11:53 AM, Hán Shěn (沈涵) <shenhan@google.com> wrote: > Yeah, the symbol "__end_rodata_hpage_align" is defined as absolute in > older binutils, the newer binutils making it relative seems > meaningless in this context. What I mean is: what actually changes in the linker output when the symbol is relative? --Andy > > On Fri, Jun 6, 2014 at 11:40 AM, Andy Lutomirski <luto@amacapital.net> wrote: >> On 06/06/2014 10:08 AM, Hán Shěn (沈涵) wrote: >>> A gentle ping? >>> >>> On Tue, Jun 3, 2014 at 2:46 PM, Hán Shěn (沈涵) <shenhan@google.com> wrote: >>>> Hi we are trying to boot up a x86_64 chrome book using binutils 2.24 and >>>> kernel 3.8, but failed. >>>> >>>> After some triage work, we found that a 2-year-old binutil CL changed the >>>> interpretation of "." in linker script (short story: absolute -> relative, >>>> long story: https://sourceware.org/ml/binutils/2012-06/msg00155.html). >>>> >>>> After some further work, we are able to boot the kernel with a kernel patch >>>> pasted at EOM. I am curious, why the upstream kernel is never hit by this >>>> behavior? We enabled "CONFIG_DEBUG_RODATA", so we were hit, is this some >>>> macro not usually turned on? >> >> What does a section-relative symbol do? >> >> --Andy > > > > -- > Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330 -- Andy Lutomirski AMA Capital Management, LLC ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "." in vmlinux.lds.S 2014-06-06 19:08 ` Andy Lutomirski @ 2014-06-06 20:45 ` Hán Shěn (沈涵) 0 siblings, 0 replies; 5+ messages in thread From: Hán Shěn (沈涵) @ 2014-06-06 20:45 UTC (permalink / raw) To: Andy Lutomirski; +Cc: linux-kernel@vger.kernel.org, X86 ML Hi Andy, this changes "Ndx" field for the symbol. For example, one of the symbol '__end_rodata_hpage_align' in symtab, the contents changed from 50206: ffffffff81800000 0 NOTYPE GLOBAL DEFAULT ABS __end_rodata_hpage_align which is correct, to 50206: ffffffff81800000 0 NOTYPE GLOBAL DEFAULT 25 __end_rodata_hpage_align (25 is the index to section '.data') which is wrong. Han On Fri, Jun 6, 2014 at 12:08 PM, Andy Lutomirski <luto@amacapital.net> wrote: > On Fri, Jun 6, 2014 at 11:53 AM, Hán Shěn (沈涵) <shenhan@google.com> wrote: >> Yeah, the symbol "__end_rodata_hpage_align" is defined as absolute in >> older binutils, the newer binutils making it relative seems >> meaningless in this context. > > What I mean is: what actually changes in the linker output when the > symbol is relative? > > --Andy > >> >> On Fri, Jun 6, 2014 at 11:40 AM, Andy Lutomirski <luto@amacapital.net> wrote: >>> On 06/06/2014 10:08 AM, Hán Shěn (沈涵) wrote: >>>> A gentle ping? >>>> >>>> On Tue, Jun 3, 2014 at 2:46 PM, Hán Shěn (沈涵) <shenhan@google.com> wrote: >>>>> Hi we are trying to boot up a x86_64 chrome book using binutils 2.24 and >>>>> kernel 3.8, but failed. >>>>> >>>>> After some triage work, we found that a 2-year-old binutil CL changed the >>>>> interpretation of "." in linker script (short story: absolute -> relative, >>>>> long story: https://sourceware.org/ml/binutils/2012-06/msg00155.html). >>>>> >>>>> After some further work, we are able to boot the kernel with a kernel patch >>>>> pasted at EOM. I am curious, why the upstream kernel is never hit by this >>>>> behavior? We enabled "CONFIG_DEBUG_RODATA", so we were hit, is this some >>>>> macro not usually turned on? >>> >>> What does a section-relative symbol do? >>> >>> --Andy >> >> >> >> -- >> Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330 > > > > -- > Andy Lutomirski > AMA Capital Management, LLC -- Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-06 20:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CACkGtriM1jwP9OSED21mNrKWPubeJp9YjL-8uetLqhjqfoH=Lg@mail.gmail.com>
2014-06-06 17:08 ` "." in vmlinux.lds.S Hán Shěn (沈涵)
2014-06-06 18:40 ` Andy Lutomirski
2014-06-06 18:53 ` Hán Shěn (沈涵)
2014-06-06 19:08 ` Andy Lutomirski
2014-06-06 20:45 ` Hán Shěn (沈涵)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox