Re: [BUG] 4.9.0 build error on Alpha

2016-12-31 Thread Bob Tracy
On Sun, Jan 01, 2017 at 01:23:06AM +, Maciej W. Rozycki wrote:
>  You need to *replace* any `.text' pseudo-ops throughout with the said 
> `.section' pseudo-op for this to have any effect.

That makes sense, especially given the fact the *original* error
messages didn't change.  Sorry for being "thick".  Corrections made.
Build proceeding...

--Bob



Re: [BUG] 4.9.0 build error on Alpha

2016-12-31 Thread Maciej W. Rozycki
On Sat, 31 Dec 2016, Bob Tracy wrote:

> With '.section .alphalib,"ax"' added to the top of "arch/alpha/lib/*.S"
> (below opening comment block, if present, but prior to any include 
> directives),
> and the modified patch to "arch/alpha/kernel/vmlinux.lds.S", I now get
> multiple relocation errors as follows:

 You need to *replace* any `.text' pseudo-ops throughout with the said 
`.section' pseudo-op for this to have any effect.

 HTH,

  Maciej



Re: [BUG] 4.9.0 build error on Alpha

2016-12-31 Thread Bob Tracy
On Sun, Jan 01, 2017 at 08:38:51AM +1300, Michael Cree wrote:
> On Sat, Dec 31, 2016 at 09:20:37AM -0600, Bob Tracy wrote:
> > With '.section .alphalib,"ax"' added to the top of "arch/alpha/lib/*.S"
> > (below opening comment block, if present, but prior to any include 
> > directives),
> > and the modified patch to "arch/alpha/kernel/vmlinux.lds.S", I now get
> > multiple relocation errors as follows:
> > 
> >   LD  init/built-in.o
> > arch/alpha/lib/lib.a(strcat.o): In function `strcat':
> > (.text+0x60): relocation truncated to fit: BRADDR against symbol `__stxcpy' 
> > defined in .text section in arch/alpha/lib/lib.a(stxcpy.o)
> > arch/alpha/lib/lib.a(strncat.o): In function `strncat':
> > (.text+0x60): relocation truncated to fit: BRADDR against symbol 
> > `__stxncpy' defined in .text section in arch/alpha/lib/lib.a(stxncpy.o)
> > drivers/built-in.o: In function `radeon_cs_parser_init.part.4':
> > drivers/gpu/drm/radeon/radeon_cs.o:(.text+0x119bd0): relocation truncated 
> > to fit: BRSGP against symbol `__copy_user' defined in .alphalib section in 
> > arch/alpha/lib/lib.a(copy_user.o)
> 
> Try changing the #ifdef MODULE above __copy_tofrom_user_nocheck to
> #if 1 in uaccess.h.   That should fix the copy_user relocation errors.

Have accumulated enough patches that I'm running a "from scratch" build
rather than trusting all the dependency checking.  It will be sometime
next year before I report back :-).

--Bob



Re: [BUG] 4.9.0 build error on Alpha

2016-12-31 Thread Bob Tracy
On Sat, Dec 31, 2016 at 10:11:45AM +, Maciej W. Rozycki wrote:
> (...) 
>  You need to keep the `*(.alphalib)' line only, i.e. drop the first and 
> the last line added by the patch, as the output section statement and its 
> curly braces surrounding input section specifiers are already produced 
> elsewhere.
> (...)

Thought to try this, but, bad news.

With '.section .alphalib,"ax"' added to the top of "arch/alpha/lib/*.S"
(below opening comment block, if present, but prior to any include directives),
and the modified patch to "arch/alpha/kernel/vmlinux.lds.S", I now get
multiple relocation errors as follows:

  LD  init/built-in.o
arch/alpha/lib/lib.a(strcat.o): In function `strcat':
(.text+0x60): relocation truncated to fit: BRADDR against symbol `__stxcpy' 
defined in .text section in arch/alpha/lib/lib.a(stxcpy.o)
arch/alpha/lib/lib.a(strncat.o): In function `strncat':
(.text+0x60): relocation truncated to fit: BRADDR against symbol `__stxncpy' 
defined in .text section in arch/alpha/lib/lib.a(stxncpy.o)
drivers/built-in.o: In function `radeon_cs_parser_init.part.4':
drivers/gpu/drm/radeon/radeon_cs.o:(.text+0x119bd0): relocation truncated to 
fit: BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/gpu/drm/radeon/radeon_cs.o:(.text+0x119cd8): relocation truncated to 
fit: BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/gpu/drm/radeon/radeon_cs.o:(.text+0x119db4): relocation truncated to 
fit: BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `radeon_cs_ioctl':
(.text+0x11aa28): relocation truncated to fit: BRSGP against symbol 
`__copy_user' defined in .alphalib section in arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `radeon_cs_ioctl':
(.text+0x11aaf8): relocation truncated to fit: BRSGP against symbol 
`__copy_user' defined in .alphalib section in arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `vga_arb_read':
drivers/gpu/vga/.tmp_vgaarb.o:(.text+0x215844): relocation truncated to fit: 
BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `vga_arb_write':
drivers/gpu/vga/.tmp_vgaarb.o:(.text+0x2162c4): relocation truncated to fit: 
BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `dma_buf_ioctl':
drivers/dma-buf/.tmp_dma-buf.o:(.text+0x233998): relocation truncated to fit: 
BRSGP against symbol `__copy_user' defined in .alphalib section in 
arch/alpha/lib/lib.a(copy_user.o)
drivers/built-in.o: In function `generic_ide_ioctl':
(.text+0x237c64): additional relocation overflows omitted from the output
Makefile:969: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

--Bob



Re: [BUG] 4.9.0 build error on Alpha

2016-12-31 Thread Maciej W. Rozycki
On Sat, 31 Dec 2016, Bob Tracy wrote:

> > > Another possibility could be to put all the lib functions into 
> > > a "alphalib" section into the final vmlinux.
> > > For that add at the top of each of the .S files in lib/ 
> > >   .section .alphalib,"ax"
> > > and apply the attached patch for arch/alpha/kernel/vmlinux.lds.S
> > > Patch and suggestion is completely untested.

 Indeed, this is even better as there won't be any unused objects included 
in output this way.  Good idea!

> > Worth a try.  I'll get going on this and report back with the results in
> > a few hours.
> 
> Apologies in advance if the formatting isn't properly preserved :-(.
> Syntax error on line 294 of the generated "vmlinux.lds" file, which is
> right where the added ".alphalib:" stanza begins:

 You need to keep the `*(.alphalib)' line only, i.e. drop the first and 
the last line added by the patch, as the output section statement and its 
curly braces surrounding input section specifiers are already produced 
elsewhere.  As a good measure you may want to prepend `ALIGN_FUNCTION();' 
as well, although I'm not sure offhand if it really matters here.

 HTH,

  Maciej