1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 20:23:53 +02:00
Go to file
Jo-Philipp Wich 338968a170 build: fix invocation of bundled ld.so in SDK and Imagebuilder
Commit 72d751cba9 "build: rework library bundling" introduced a new helper
binary "runas" whose sole purpose was mangling the argv vector passed to
the actual called ELF image so that the renamed executable could obtain the
proper name from argv[0].

This approach, however totally defeated the purpose of calling bundled ELF
executables through the shipped ld.so loader since the execv() invocation
performed by "runas" would cause the kernel the interprete the final program
image through the system ELF loader again.

To solve the problem, use an alternative approach of shipping a shared object
"runas.so" which uses an ELF ".init_array" function pointer to obtain the
argv[] vector of the to-be-executed main() function and mangle it in-place.

The actual argv[0] value to use is communicated out-of-band using an
environment variable "RUNAS_ARG0" by the shell wrapper script. The wrapper
script also takes care of setting LD_PRELOAD to instruct the shipped ELF
loader to preload the actual ELF program image with the "runas.so" helper
library.

Fixes FS#909.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ef1cafa736)
2017-12-13 16:23:39 +01:00
.github Add Issue submission template (redirect to bugs.lede-project.org) 2016-09-01 09:01:04 -04:00
config build: allow specifying flow-control to grub on serial console 2017-12-13 14:59:27 +01:00
include netfilter: add iptables-mod-rpfilter package 2017-12-13 16:23:38 +01:00
package kmod-sched-cake: drop maintainer 2017-12-13 16:23:39 +01:00
scripts build: fix invocation of bundled ld.so in SDK and Imagebuilder 2017-12-13 16:23:39 +01:00
target imagebuilder: don't rewrite package list output 2017-12-13 16:00:57 +01:00
toolchain build: remove old kernel-headers build directories 2017-12-13 16:00:27 +01:00
tools tar: override symlink permissions 2017-12-13 15:48:33 +01:00
.gitattributes add .gitattributes to prevent the git autocrlf option from messing with CRLF/LF in files 2012-05-08 13:30:49 +00:00
.gitignore gitignore: add /overlay 2017-01-15 18:16:29 +01:00
BSDmakefile add missing copyright header 2007-02-26 01:05:09 +00:00
Config.in branding: add LEDE branding 2016-03-24 22:40:13 +01:00
feeds.conf.default LEDE v17.01.4: revert to branch defaults 2017-10-18 11:54:32 +03:00
LICENSE finally move buildroot-ng to trunk 2016-03-20 17:29:15 +01:00
Makefile Makefile: ensure that BIN_DIR exists for diffconfig 2017-01-08 18:50:00 +01:00
README README: Update project README 2016-05-12 03:29:36 +02:00
rules.mk build: Pass -iremap gcc option as a single argument 2017-12-13 14:24:21 +01:00

This is the buildsystem for the LEDE Linux distribution.

Please use "make menuconfig" to choose your preferred
configuration for the toolchain and firmware.

You need to have installed gcc, binutils, bzip2, flex, python, perl, make,
find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers.

Run "./scripts/feeds update -a" to get all the latest package definitions
defined in feeds.conf / feeds.conf.default respectively
and "./scripts/feeds install -a" to install symlinks of all of them into
package/feeds/.

Use "make menuconfig" to configure your image.

Simply running "make" will build your firmware.
It will download all sources, build the cross-compile toolchain, 
the kernel and all choosen applications.

To build your own firmware you need to have access to a Linux, BSD or MacOSX system
(case-sensitive filesystem required). Cygwin will not be supported because of
the lack of case sensitiveness in the file system.


Sunshine!
	Your LEDE Community
	http://www.lede-project.org