PIC/PIE issue on Nios2

Florian Weimer fweimer@redhat.com
Fri May 28 08:01:43 GMT 2021


* Romain Naour via Libc-alpha:

> Analyzing one of the binary with strace show that the problem occur
> very early when starting the new process:
>
>  # strace ./busybox
>  execve("./busybox", ["./busybox"], 0x7f91ce90 /* 10 vars */) = -1 ENOMEM
> (Cannot allocate memory)
>  +++ killed by SIGSEGV +++
>
> I tried with several binutils/glibc/gcc version without any success.
>
> Is PIE is really supported for Nios2 architecture ?

If the kernel cannot execve the executable at all, that looks more like
a linker problem.  It could also be a kernel bug, of course.  (Address
space layout is architecture-specific.)

There is PIE and statically linked PIE.  The latter should be supported
on all targets.  Statically linked PIE requires toolchain changes and a
little bit of architecture-specific code in glibc.

Thanks,
Florian



More information about the Libc-alpha mailing list