Re: [systemd-devel] systemd build process, stripped ELF flags (MIPS)

2015-02-17 Thread Michael Biebl
2015-01-19 19:37 GMT+01:00 Manuel Lauss :
> On Mon, Jan 19, 2015 at 3:14 PM, Lennart Poettering
>  wrote:
>> On Mon, 19.01.15 09:47, Manuel Lauss (manuel.la...@gmail.com) wrote:
>>
>>> Can anyone please point out why the .MIPS.abiflags sections are
>>> omitted entirely?
>>> I've tried to build with STRIP=/bin/true but that didn't help, and I don't 
>>> know
>>> enough about the build process to fix it myself.
>>
>> Maybe the MIPS toolchain strips these if --gc-sections is passed to
>> LD, which we do?
>
> Turned out to be something completely different:  systemd tries to us gold
> as the default linked. gold on mips isn't really quite usable yet; after
> removing the ld.gold binary systemd now has the necessary abiflags.

gold seems to still have issues on various architectures.

Since ifuncs aren't used any more for the compat libraries there isn't a real
reason anymore to explicitely switch to gold as a linker.

I suggest we just drop -Wl,-fuse-ld=gold from LDFLAGS and use the
default linker again.




-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd build process, stripped ELF flags (MIPS)

2015-01-19 Thread Manuel Lauss
On Mon, Jan 19, 2015 at 3:14 PM, Lennart Poettering
 wrote:
> On Mon, 19.01.15 09:47, Manuel Lauss (manuel.la...@gmail.com) wrote:
>
>> Can anyone please point out why the .MIPS.abiflags sections are
>> omitted entirely?
>> I've tried to build with STRIP=/bin/true but that didn't help, and I don't 
>> know
>> enough about the build process to fix it myself.
>
> Maybe the MIPS toolchain strips these if --gc-sections is passed to
> LD, which we do?

Turned out to be something completely different:  systemd tries to us gold
as the default linked. gold on mips isn't really quite usable yet; after
removing the ld.gold binary systemd now has the necessary abiflags.

Thanks!
 Manuiel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd build process, stripped ELF flags (MIPS)

2015-01-19 Thread Cristian Rodríguez

El 19/01/15 a las 05:47, Manuel Lauss escribió:


The systemd build process manages to create binaries without this
.MIPS.abiflags section, and this leads the 3.18 kernel to refuse to load it:


Nope, the build process does no such thing, your toolchain is buggy, 
wild guess is that --gc-sections does not know that section is mandatory 
and removes it.


Please talk about this with binutils developers ;-)


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd build process, stripped ELF flags (MIPS)

2015-01-19 Thread Lennart Poettering
On Mon, 19.01.15 09:47, Manuel Lauss (manuel.la...@gmail.com) wrote:

> Can anyone please point out why the .MIPS.abiflags sections are
> omitted entirely?
> I've tried to build with STRIP=/bin/true but that didn't help, and I don't 
> know
> enough about the build process to fix it myself.

Maybe the MIPS toolchain strips these if --gc-sections is passed to
LD, which we do?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemd build process, stripped ELF flags (MIPS)

2015-01-19 Thread Manuel Lauss
Hello,

MIPS Linux recently introduced updates to its FPU ABI, and for that to
work correctly,
ELF binaries now have to have a ".MIPS.abiflags" section.  This is an example
binary built with binutils 2.25+:

readelf -hl /lib/libc.so.6
[...]

 Section to Segment mapping:
  Segment Sections...
   00
   01 .interp
   02 .MIPS.abiflags
[...]

Newer MIPS kernels will refuse to load binaries and libs which have mismatched
values in .MIPS.abiflags or of one of the involved binaries has .MIPS.abiflags
missing (a patch to linux has been posted to relax that though).

The systemd build process manages to create binaries without this
.MIPS.abiflags section, and this leads the 3.18 kernel to refuse to load it:


Failed to execute /usr/lib/systemd/systemd (error -84).  Attempting default


readelf -hl /usr/lib/systemd/systemd
[...]
 Section to Segment mapping:
  Segment Sections...
   00
   01 .interp
   02 .interp .note.ABI-tag .dynsym .dynstr .hash .gnu.version
.gnu.version_r .rel.dyn .init .text .fini .rodata .eh_frame
.eh_frame_hdr
   03 .tdata .data.rel.ro.local .jcr .fini_array .init_array
.data.rel.ro .dynamic .tm_clone_table .sdata .data BUS_ERROR_MAP .got
.bss
   04
   05 .dynamic
   06 .note.ABI-tag
   07 .eh_frame_hdr
   08 .tdata .tbss
   09 .tdata .data.rel.ro.local .jcr .fini_array .init_array
.data.rel.ro .dynamic


Can anyone please point out why the .MIPS.abiflags sections are
omitted entirely?
I've tried to build with STRIP=/bin/true but that didn't help, and I don't know
enough about the build process to fix it myself.

Thanks!
  Manuel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel