├── COPYING ├── Makefile ├── Makefile.am ├── Makefile.in ├── README ├── aarch64-linux-android-patchelf ├── aclocal.m4 ├── arm-linux-androideabi-patchelf ├── build-aux ├── compile ├── depcomp ├── install-sh ├── missing └── test-driver ├── config.log ├── config.status ├── configure ├── configure.ac ├── gen_config.sh ├── patchelf.1 ├── patchelf.spec ├── patchelf.spec.in ├── src ├── .deps │ └── patchelf.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── elf.h └── patchelf.cc ├── tests ├── .deps │ ├── bar.Po │ ├── big-dynstr.Po │ ├── foo.Po │ ├── main.Po │ ├── no_rpath-no-rpath.Po │ ├── simple-simple.Po │ └── simple.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── bar.c ├── big-dynstr.sh ├── foo.c ├── main.c ├── no-rpath-prebuild.sh ├── no-rpath-prebuild │ ├── no-rpath-amd64 │ ├── no-rpath-armel │ ├── no-rpath-armhf │ ├── no-rpath-hurd-i386 │ ├── no-rpath-i386 │ ├── no-rpath-ia64 │ ├── no-rpath-kfreebsd-amd64 │ ├── no-rpath-kfreebsd-i386 │ ├── no-rpath-mips │ ├── no-rpath-mipsel │ ├── no-rpath-powerpc │ ├── no-rpath-s390 │ ├── no-rpath-sh4 │ └── no-rpath-sparc ├── no-rpath.c ├── no-rpath.sh ├── plain-fail.sh ├── plain-run.sh ├── set-interpreter-long.sh ├── set-interpreter-short.sh ├── set-rpath-library.sh ├── set-rpath.sh ├── shrink-rpath.sh ├── simple.c └── soname.sh └── version /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src tests 2 | 3 | EXTRA_DIST = COPYING README patchelf.spec version $(man1_MANS) 4 | 5 | man1_MANS = patchelf.1 6 | 7 | doc_DATA = README 8 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.15 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/@PACKAGE@ 74 | pkgincludedir = $(includedir)/@PACKAGE@ 75 | pkglibdir = $(libdir)/@PACKAGE@ 76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | subdir = . 90 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 91 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 92 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 93 | $(ACLOCAL_M4) 94 | DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ 95 | $(am__configure_deps) $(am__DIST_COMMON) 96 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 97 | configure.lineno config.status.lineno 98 | mkinstalldirs = $(install_sh) -d 99 | CONFIG_CLEAN_FILES = patchelf.spec 100 | CONFIG_CLEAN_VPATH_FILES = 101 | AM_V_P = $(am__v_P_@AM_V@) 102 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 103 | am__v_P_0 = false 104 | am__v_P_1 = : 105 | AM_V_GEN = $(am__v_GEN_@AM_V@) 106 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 107 | am__v_GEN_0 = @echo " GEN " $@; 108 | am__v_GEN_1 = 109 | AM_V_at = $(am__v_at_@AM_V@) 110 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 111 | am__v_at_0 = @ 112 | am__v_at_1 = 113 | SOURCES = 114 | DIST_SOURCES = 115 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ 116 | ctags-recursive dvi-recursive html-recursive info-recursive \ 117 | install-data-recursive install-dvi-recursive \ 118 | install-exec-recursive install-html-recursive \ 119 | install-info-recursive install-pdf-recursive \ 120 | install-ps-recursive install-recursive installcheck-recursive \ 121 | installdirs-recursive pdf-recursive ps-recursive \ 122 | tags-recursive uninstall-recursive 123 | am__can_run_installinfo = \ 124 | case $$AM_UPDATE_INFO_DIR in \ 125 | n|no|NO) false;; \ 126 | *) (install-info --version) >/dev/null 2>&1;; \ 127 | esac 128 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 129 | am__vpath_adj = case $$p in \ 130 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 131 | *) f=$$p;; \ 132 | esac; 133 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 134 | am__install_max = 40 135 | am__nobase_strip_setup = \ 136 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 137 | am__nobase_strip = \ 138 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 139 | am__nobase_list = $(am__nobase_strip_setup); \ 140 | for p in $$list; do echo "$$p $$p"; done | \ 141 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 142 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 143 | if (++n[$$2] == $(am__install_max)) \ 144 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 145 | END { for (dir in files) print dir, files[dir] }' 146 | am__base_list = \ 147 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 148 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 149 | am__uninstall_files_from_dir = { \ 150 | test -z "$$files" \ 151 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 152 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 153 | $(am__cd) "$$dir" && rm -f $$files; }; \ 154 | } 155 | man1dir = $(mandir)/man1 156 | am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" 157 | NROFF = nroff 158 | MANS = $(man1_MANS) 159 | DATA = $(doc_DATA) 160 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 161 | distclean-recursive maintainer-clean-recursive 162 | am__recursive_targets = \ 163 | $(RECURSIVE_TARGETS) \ 164 | $(RECURSIVE_CLEAN_TARGETS) \ 165 | $(am__extra_recursive_targets) 166 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 167 | cscope distdir dist dist-all distcheck 168 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 169 | # Read a list of newline-separated strings from the standard input, 170 | # and print each of them once, without duplicates. Input order is 171 | # *not* preserved. 172 | am__uniquify_input = $(AWK) '\ 173 | BEGIN { nonempty = 0; } \ 174 | { items[$$0] = 1; nonempty = 1; } \ 175 | END { if (nonempty) { for (i in items) print i; }; } \ 176 | ' 177 | # Make sure the list of sources is unique. This is necessary because, 178 | # e.g., the same source file might be shared among _SOURCES variables 179 | # for different programs/libraries. 180 | am__define_uniq_tagged_files = \ 181 | list='$(am__tagged_files)'; \ 182 | unique=`for i in $$list; do \ 183 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 184 | done | $(am__uniquify_input)` 185 | ETAGS = etags 186 | CTAGS = ctags 187 | CSCOPE = cscope 188 | DIST_SUBDIRS = $(SUBDIRS) 189 | am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/patchelf.spec.in \ 190 | $(top_srcdir)/build-aux/compile \ 191 | $(top_srcdir)/build-aux/install-sh \ 192 | $(top_srcdir)/build-aux/missing COPYING README \ 193 | build-aux/compile build-aux/install-sh build-aux/missing 194 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 195 | distdir = $(PACKAGE)-$(VERSION) 196 | top_distdir = $(distdir) 197 | am__remove_distdir = \ 198 | if test -d "$(distdir)"; then \ 199 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 200 | && rm -rf "$(distdir)" \ 201 | || { sleep 5 && rm -rf "$(distdir)"; }; \ 202 | else :; fi 203 | am__post_remove_distdir = $(am__remove_distdir) 204 | am__relativize = \ 205 | dir0=`pwd`; \ 206 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 207 | sed_rest='s,^[^/]*/*,,'; \ 208 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 209 | sed_butlast='s,/*[^/]*$$,,'; \ 210 | while test -n "$$dir1"; do \ 211 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 212 | if test "$$first" != "."; then \ 213 | if test "$$first" = ".."; then \ 214 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 215 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 216 | else \ 217 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 218 | if test "$$first2" = "$$first"; then \ 219 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 220 | else \ 221 | dir2="../$$dir2"; \ 222 | fi; \ 223 | dir0="$$dir0"/"$$first"; \ 224 | fi; \ 225 | fi; \ 226 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 227 | done; \ 228 | reldir="$$dir2" 229 | DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 230 | GZIP_ENV = --best 231 | DIST_TARGETS = dist-bzip2 dist-gzip 232 | distuninstallcheck_listfiles = find . -type f -print 233 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ 234 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' 235 | distcleancheck_listfiles = find . -type f -print 236 | ACLOCAL = @ACLOCAL@ 237 | AMTAR = @AMTAR@ 238 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 239 | AUTOCONF = @AUTOCONF@ 240 | AUTOHEADER = @AUTOHEADER@ 241 | AUTOMAKE = @AUTOMAKE@ 242 | AWK = @AWK@ 243 | CC = @CC@ 244 | CCDEPMODE = @CCDEPMODE@ 245 | CFLAGS = @CFLAGS@ 246 | CPPFLAGS = @CPPFLAGS@ 247 | CXX = @CXX@ 248 | CXXDEPMODE = @CXXDEPMODE@ 249 | CXXFLAGS = @CXXFLAGS@ 250 | CYGPATH_W = @CYGPATH_W@ 251 | DEFS = @DEFS@ 252 | DEPDIR = @DEPDIR@ 253 | ECHO_C = @ECHO_C@ 254 | ECHO_N = @ECHO_N@ 255 | ECHO_T = @ECHO_T@ 256 | EXEEXT = @EXEEXT@ 257 | INSTALL = @INSTALL@ 258 | INSTALL_DATA = @INSTALL_DATA@ 259 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 260 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 261 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 262 | LDFLAGS = @LDFLAGS@ 263 | LIBOBJS = @LIBOBJS@ 264 | LIBS = @LIBS@ 265 | LTLIBOBJS = @LTLIBOBJS@ 266 | MAKEINFO = @MAKEINFO@ 267 | MKDIR_P = @MKDIR_P@ 268 | OBJEXT = @OBJEXT@ 269 | PACKAGE = @PACKAGE@ 270 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 271 | PACKAGE_NAME = @PACKAGE_NAME@ 272 | PACKAGE_STRING = @PACKAGE_STRING@ 273 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 274 | PACKAGE_URL = @PACKAGE_URL@ 275 | PACKAGE_VERSION = @PACKAGE_VERSION@ 276 | PATH_SEPARATOR = @PATH_SEPARATOR@ 277 | SET_MAKE = @SET_MAKE@ 278 | SHELL = @SHELL@ 279 | STRIP = @STRIP@ 280 | VERSION = @VERSION@ 281 | abs_builddir = @abs_builddir@ 282 | abs_srcdir = @abs_srcdir@ 283 | abs_top_builddir = @abs_top_builddir@ 284 | abs_top_srcdir = @abs_top_srcdir@ 285 | ac_ct_CC = @ac_ct_CC@ 286 | ac_ct_CXX = @ac_ct_CXX@ 287 | am__include = @am__include@ 288 | am__leading_dot = @am__leading_dot@ 289 | am__quote = @am__quote@ 290 | am__tar = @am__tar@ 291 | am__untar = @am__untar@ 292 | bindir = @bindir@ 293 | build_alias = @build_alias@ 294 | builddir = @builddir@ 295 | datadir = @datadir@ 296 | datarootdir = @datarootdir@ 297 | docdir = @docdir@ 298 | dvidir = @dvidir@ 299 | exec_prefix = @exec_prefix@ 300 | host_alias = @host_alias@ 301 | htmldir = @htmldir@ 302 | includedir = @includedir@ 303 | infodir = @infodir@ 304 | install_sh = @install_sh@ 305 | libdir = @libdir@ 306 | libexecdir = @libexecdir@ 307 | localedir = @localedir@ 308 | localstatedir = @localstatedir@ 309 | mandir = @mandir@ 310 | mkdir_p = @mkdir_p@ 311 | oldincludedir = @oldincludedir@ 312 | pdfdir = @pdfdir@ 313 | prefix = @prefix@ 314 | program_transform_name = @program_transform_name@ 315 | psdir = @psdir@ 316 | sbindir = @sbindir@ 317 | sharedstatedir = @sharedstatedir@ 318 | srcdir = @srcdir@ 319 | sysconfdir = @sysconfdir@ 320 | target_alias = @target_alias@ 321 | top_build_prefix = @top_build_prefix@ 322 | top_builddir = @top_builddir@ 323 | top_srcdir = @top_srcdir@ 324 | SUBDIRS = src tests 325 | EXTRA_DIST = COPYING README patchelf.spec version $(man1_MANS) 326 | man1_MANS = patchelf.1 327 | doc_DATA = README 328 | all: all-recursive 329 | 330 | .SUFFIXES: 331 | am--refresh: Makefile 332 | @: 333 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 334 | @for dep in $?; do \ 335 | case '$(am__configure_deps)' in \ 336 | *$$dep*) \ 337 | echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ 338 | $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ 339 | && exit 0; \ 340 | exit 1;; \ 341 | esac; \ 342 | done; \ 343 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ 344 | $(am__cd) $(top_srcdir) && \ 345 | $(AUTOMAKE) --foreign Makefile 346 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 347 | @case '$?' in \ 348 | *config.status*) \ 349 | echo ' $(SHELL) ./config.status'; \ 350 | $(SHELL) ./config.status;; \ 351 | *) \ 352 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 353 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 354 | esac; 355 | 356 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 357 | $(SHELL) ./config.status --recheck 358 | 359 | $(top_srcdir)/configure: $(am__configure_deps) 360 | $(am__cd) $(srcdir) && $(AUTOCONF) 361 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 362 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 363 | $(am__aclocal_m4_deps): 364 | patchelf.spec: $(top_builddir)/config.status $(srcdir)/patchelf.spec.in 365 | cd $(top_builddir) && $(SHELL) ./config.status $@ 366 | install-man1: $(man1_MANS) 367 | @$(NORMAL_INSTALL) 368 | @list1='$(man1_MANS)'; \ 369 | list2=''; \ 370 | test -n "$(man1dir)" \ 371 | && test -n "`echo $$list1$$list2`" \ 372 | || exit 0; \ 373 | echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ 374 | $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ 375 | { for i in $$list1; do echo "$$i"; done; \ 376 | if test -n "$$list2"; then \ 377 | for i in $$list2; do echo "$$i"; done \ 378 | | sed -n '/\.1[a-z]*$$/p'; \ 379 | fi; \ 380 | } | while read p; do \ 381 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 382 | echo "$$d$$p"; echo "$$p"; \ 383 | done | \ 384 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 385 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 386 | sed 'N;N;s,\n, ,g' | { \ 387 | list=; while read file base inst; do \ 388 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 389 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 390 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 391 | fi; \ 392 | done; \ 393 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 394 | while read files; do \ 395 | test -z "$$files" || { \ 396 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 397 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 398 | done; } 399 | 400 | uninstall-man1: 401 | @$(NORMAL_UNINSTALL) 402 | @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ 403 | files=`{ for i in $$list; do echo "$$i"; done; \ 404 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 405 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 406 | dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) 407 | install-docDATA: $(doc_DATA) 408 | @$(NORMAL_INSTALL) 409 | @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ 410 | if test -n "$$list"; then \ 411 | echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ 412 | $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ 413 | fi; \ 414 | for p in $$list; do \ 415 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 416 | echo "$$d$$p"; \ 417 | done | $(am__base_list) | \ 418 | while read files; do \ 419 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ 420 | $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ 421 | done 422 | 423 | uninstall-docDATA: 424 | @$(NORMAL_UNINSTALL) 425 | @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ 426 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 427 | dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) 428 | 429 | # This directory's subdirectories are mostly independent; you can cd 430 | # into them and run 'make' without going through this Makefile. 431 | # To change the values of 'make' variables: instead of editing Makefiles, 432 | # (1) if the variable is set in 'config.status', edit 'config.status' 433 | # (which will cause the Makefiles to be regenerated when you run 'make'); 434 | # (2) otherwise, pass the desired values on the 'make' command line. 435 | $(am__recursive_targets): 436 | @fail=; \ 437 | if $(am__make_keepgoing); then \ 438 | failcom='fail=yes'; \ 439 | else \ 440 | failcom='exit 1'; \ 441 | fi; \ 442 | dot_seen=no; \ 443 | target=`echo $@ | sed s/-recursive//`; \ 444 | case "$@" in \ 445 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 446 | *) list='$(SUBDIRS)' ;; \ 447 | esac; \ 448 | for subdir in $$list; do \ 449 | echo "Making $$target in $$subdir"; \ 450 | if test "$$subdir" = "."; then \ 451 | dot_seen=yes; \ 452 | local_target="$$target-am"; \ 453 | else \ 454 | local_target="$$target"; \ 455 | fi; \ 456 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 457 | || eval $$failcom; \ 458 | done; \ 459 | if test "$$dot_seen" = "no"; then \ 460 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 461 | fi; test -z "$$fail" 462 | 463 | ID: $(am__tagged_files) 464 | $(am__define_uniq_tagged_files); mkid -fID $$unique 465 | tags: tags-recursive 466 | TAGS: tags 467 | 468 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 469 | set x; \ 470 | here=`pwd`; \ 471 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 472 | include_option=--etags-include; \ 473 | empty_fix=.; \ 474 | else \ 475 | include_option=--include; \ 476 | empty_fix=; \ 477 | fi; \ 478 | list='$(SUBDIRS)'; for subdir in $$list; do \ 479 | if test "$$subdir" = .; then :; else \ 480 | test ! -f $$subdir/TAGS || \ 481 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 482 | fi; \ 483 | done; \ 484 | $(am__define_uniq_tagged_files); \ 485 | shift; \ 486 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 487 | test -n "$$unique" || unique=$$empty_fix; \ 488 | if test $$# -gt 0; then \ 489 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 490 | "$$@" $$unique; \ 491 | else \ 492 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 493 | $$unique; \ 494 | fi; \ 495 | fi 496 | ctags: ctags-recursive 497 | 498 | CTAGS: ctags 499 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 500 | $(am__define_uniq_tagged_files); \ 501 | test -z "$(CTAGS_ARGS)$$unique" \ 502 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 503 | $$unique 504 | 505 | GTAGS: 506 | here=`$(am__cd) $(top_builddir) && pwd` \ 507 | && $(am__cd) $(top_srcdir) \ 508 | && gtags -i $(GTAGS_ARGS) "$$here" 509 | cscope: cscope.files 510 | test ! -s cscope.files \ 511 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) 512 | clean-cscope: 513 | -rm -f cscope.files 514 | cscope.files: clean-cscope cscopelist 515 | cscopelist: cscopelist-recursive 516 | 517 | cscopelist-am: $(am__tagged_files) 518 | list='$(am__tagged_files)'; \ 519 | case "$(srcdir)" in \ 520 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 521 | *) sdir=$(subdir)/$(srcdir) ;; \ 522 | esac; \ 523 | for i in $$list; do \ 524 | if test -f "$$i"; then \ 525 | echo "$(subdir)/$$i"; \ 526 | else \ 527 | echo "$$sdir/$$i"; \ 528 | fi; \ 529 | done >> $(top_builddir)/cscope.files 530 | 531 | distclean-tags: 532 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 533 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 534 | 535 | distdir: $(DISTFILES) 536 | $(am__remove_distdir) 537 | test -d "$(distdir)" || mkdir "$(distdir)" 538 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 539 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 540 | list='$(DISTFILES)'; \ 541 | dist_files=`for file in $$list; do echo $$file; done | \ 542 | sed -e "s|^$$srcdirstrip/||;t" \ 543 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 544 | case $$dist_files in \ 545 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 546 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 547 | sort -u` ;; \ 548 | esac; \ 549 | for file in $$dist_files; do \ 550 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 551 | if test -d $$d/$$file; then \ 552 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 553 | if test -d "$(distdir)/$$file"; then \ 554 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 555 | fi; \ 556 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 557 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 558 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 559 | fi; \ 560 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 561 | else \ 562 | test -f "$(distdir)/$$file" \ 563 | || cp -p $$d/$$file "$(distdir)/$$file" \ 564 | || exit 1; \ 565 | fi; \ 566 | done 567 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 568 | if test "$$subdir" = .; then :; else \ 569 | $(am__make_dryrun) \ 570 | || test -d "$(distdir)/$$subdir" \ 571 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 572 | || exit 1; \ 573 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 574 | $(am__relativize); \ 575 | new_distdir=$$reldir; \ 576 | dir1=$$subdir; dir2="$(top_distdir)"; \ 577 | $(am__relativize); \ 578 | new_top_distdir=$$reldir; \ 579 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 580 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 581 | ($(am__cd) $$subdir && \ 582 | $(MAKE) $(AM_MAKEFLAGS) \ 583 | top_distdir="$$new_top_distdir" \ 584 | distdir="$$new_distdir" \ 585 | am__remove_distdir=: \ 586 | am__skip_length_check=: \ 587 | am__skip_mode_fix=: \ 588 | distdir) \ 589 | || exit 1; \ 590 | fi; \ 591 | done 592 | -test -n "$(am__skip_mode_fix)" \ 593 | || find "$(distdir)" -type d ! -perm -755 \ 594 | -exec chmod u+rwx,go+rx {} \; -o \ 595 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 596 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 597 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 598 | || chmod -R a+r "$(distdir)" 599 | dist-gzip: distdir 600 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 601 | $(am__post_remove_distdir) 602 | dist-bzip2: distdir 603 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 604 | $(am__post_remove_distdir) 605 | 606 | dist-lzip: distdir 607 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz 608 | $(am__post_remove_distdir) 609 | 610 | dist-xz: distdir 611 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz 612 | $(am__post_remove_distdir) 613 | 614 | dist-tarZ: distdir 615 | @echo WARNING: "Support for distribution archives compressed with" \ 616 | "legacy program 'compress' is deprecated." >&2 617 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 618 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 619 | $(am__post_remove_distdir) 620 | 621 | dist-shar: distdir 622 | @echo WARNING: "Support for shar distribution archives is" \ 623 | "deprecated." >&2 624 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 625 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 626 | $(am__post_remove_distdir) 627 | 628 | dist-zip: distdir 629 | -rm -f $(distdir).zip 630 | zip -rq $(distdir).zip $(distdir) 631 | $(am__post_remove_distdir) 632 | 633 | dist dist-all: 634 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' 635 | $(am__post_remove_distdir) 636 | 637 | # This target untars the dist file and tries a VPATH configuration. Then 638 | # it guarantees that the distribution is self-contained by making another 639 | # tarfile. 640 | distcheck: dist 641 | case '$(DIST_ARCHIVES)' in \ 642 | *.tar.gz*) \ 643 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 644 | *.tar.bz2*) \ 645 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 646 | *.tar.lz*) \ 647 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ 648 | *.tar.xz*) \ 649 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 650 | *.tar.Z*) \ 651 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 652 | *.shar.gz*) \ 653 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 654 | *.zip*) \ 655 | unzip $(distdir).zip ;;\ 656 | esac 657 | chmod -R a-w $(distdir) 658 | chmod u+w $(distdir) 659 | mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst 660 | chmod a-w $(distdir) 661 | test -d $(distdir)/_build || exit 0; \ 662 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 663 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 664 | && am__cwd=`pwd` \ 665 | && $(am__cd) $(distdir)/_build/sub \ 666 | && ../../configure \ 667 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ 668 | $(DISTCHECK_CONFIGURE_FLAGS) \ 669 | --srcdir=../.. --prefix="$$dc_install_base" \ 670 | && $(MAKE) $(AM_MAKEFLAGS) \ 671 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 672 | && $(MAKE) $(AM_MAKEFLAGS) check \ 673 | && $(MAKE) $(AM_MAKEFLAGS) install \ 674 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 675 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 676 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 677 | distuninstallcheck \ 678 | && chmod -R a-w "$$dc_install_base" \ 679 | && ({ \ 680 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 681 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 682 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 683 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 684 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 685 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 686 | && rm -rf "$$dc_destdir" \ 687 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 688 | && rm -rf $(DIST_ARCHIVES) \ 689 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 690 | && cd "$$am__cwd" \ 691 | || exit 1 692 | $(am__post_remove_distdir) 693 | @(echo "$(distdir) archives ready for distribution: "; \ 694 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 695 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 696 | distuninstallcheck: 697 | @test -n '$(distuninstallcheck_dir)' || { \ 698 | echo 'ERROR: trying to run $@ with an empty' \ 699 | '$$(distuninstallcheck_dir)' >&2; \ 700 | exit 1; \ 701 | }; \ 702 | $(am__cd) '$(distuninstallcheck_dir)' || { \ 703 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ 704 | exit 1; \ 705 | }; \ 706 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ 707 | || { echo "ERROR: files left after uninstall:" ; \ 708 | if test -n "$(DESTDIR)"; then \ 709 | echo " (check DESTDIR support)"; \ 710 | fi ; \ 711 | $(distuninstallcheck_listfiles) ; \ 712 | exit 1; } >&2 713 | distcleancheck: distclean 714 | @if test '$(srcdir)' = . ; then \ 715 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 716 | exit 1 ; \ 717 | fi 718 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 719 | || { echo "ERROR: files left in build directory after distclean:" ; \ 720 | $(distcleancheck_listfiles) ; \ 721 | exit 1; } >&2 722 | check-am: all-am 723 | check: check-recursive 724 | all-am: Makefile $(MANS) $(DATA) 725 | installdirs: installdirs-recursive 726 | installdirs-am: 727 | for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ 728 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 729 | done 730 | install: install-recursive 731 | install-exec: install-exec-recursive 732 | install-data: install-data-recursive 733 | uninstall: uninstall-recursive 734 | 735 | install-am: all-am 736 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 737 | 738 | installcheck: installcheck-recursive 739 | install-strip: 740 | if test -z '$(STRIP)'; then \ 741 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 742 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 743 | install; \ 744 | else \ 745 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 746 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 747 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 748 | fi 749 | mostlyclean-generic: 750 | 751 | clean-generic: 752 | 753 | distclean-generic: 754 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 755 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 756 | 757 | maintainer-clean-generic: 758 | @echo "This command is intended for maintainers to use" 759 | @echo "it deletes files that may require special tools to rebuild." 760 | clean: clean-recursive 761 | 762 | clean-am: clean-generic mostlyclean-am 763 | 764 | distclean: distclean-recursive 765 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 766 | -rm -f Makefile 767 | distclean-am: clean-am distclean-generic distclean-tags 768 | 769 | dvi: dvi-recursive 770 | 771 | dvi-am: 772 | 773 | html: html-recursive 774 | 775 | html-am: 776 | 777 | info: info-recursive 778 | 779 | info-am: 780 | 781 | install-data-am: install-docDATA install-man 782 | 783 | install-dvi: install-dvi-recursive 784 | 785 | install-dvi-am: 786 | 787 | install-exec-am: 788 | 789 | install-html: install-html-recursive 790 | 791 | install-html-am: 792 | 793 | install-info: install-info-recursive 794 | 795 | install-info-am: 796 | 797 | install-man: install-man1 798 | 799 | install-pdf: install-pdf-recursive 800 | 801 | install-pdf-am: 802 | 803 | install-ps: install-ps-recursive 804 | 805 | install-ps-am: 806 | 807 | installcheck-am: 808 | 809 | maintainer-clean: maintainer-clean-recursive 810 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 811 | -rm -rf $(top_srcdir)/autom4te.cache 812 | -rm -f Makefile 813 | maintainer-clean-am: distclean-am maintainer-clean-generic 814 | 815 | mostlyclean: mostlyclean-recursive 816 | 817 | mostlyclean-am: mostlyclean-generic 818 | 819 | pdf: pdf-recursive 820 | 821 | pdf-am: 822 | 823 | ps: ps-recursive 824 | 825 | ps-am: 826 | 827 | uninstall-am: uninstall-docDATA uninstall-man 828 | 829 | uninstall-man: uninstall-man1 830 | 831 | .MAKE: $(am__recursive_targets) install-am install-strip 832 | 833 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ 834 | am--refresh check check-am clean clean-cscope clean-generic \ 835 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ 836 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ 837 | distcheck distclean distclean-generic distclean-tags \ 838 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ 839 | html-am info info-am install install-am install-data \ 840 | install-data-am install-docDATA install-dvi install-dvi-am \ 841 | install-exec install-exec-am install-html install-html-am \ 842 | install-info install-info-am install-man install-man1 \ 843 | install-pdf install-pdf-am install-ps install-ps-am \ 844 | install-strip installcheck installcheck-am installdirs \ 845 | installdirs-am maintainer-clean maintainer-clean-generic \ 846 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ 847 | tags-am uninstall uninstall-am uninstall-docDATA uninstall-man \ 848 | uninstall-man1 849 | 850 | .PRECIOUS: Makefile 851 | 852 | 853 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 854 | # Otherwise a system limit (for SysV at least) may be exceeded. 855 | .NOEXPORT: 856 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | PatchELF is a simple utility for modifing existing ELF executables and 2 | libraries. In particular, it can do the following: 3 | 4 | * Change the dynamic loader ("ELF interpreter") of executables: 5 | 6 | $ patchelf --set-interpreter /lib/my-ld-linux.so.2 my-program 7 | 8 | * Change the RPATH of executables and libraries: 9 | 10 | $ patchelf --set-rpath /opt/my-libs/lib:/other-libs my-program 11 | 12 | * Shrink the RPATH of executables and libraries: 13 | 14 | $ patchelf --shrink-rpath my-program 15 | 16 | This removes from the RPATH all directories that do not contain a 17 | library referenced by DT_NEEDED fields of the executable or library. 18 | For instance, if an executable references one library libfoo.so, has 19 | an RPATH "/lib:/usr/lib:/foo/lib", and libfoo.so can only be found 20 | in /foo/lib, then the new RPATH will be "/foo/lib". 21 | 22 | * Remove declared dependencies on dynamic libraries (DT_NEEDED 23 | entries): 24 | 25 | $ patchelf --remove-needed libfoo.so.1 my-program 26 | 27 | This option can be given multiple times. 28 | 29 | * Add a declared dependency on a dynamic library (DT_NEEDED): 30 | 31 | $ patchelf --add-needed libfoo.so.1 my-program 32 | 33 | This option can be give multiple times. 34 | 35 | * Replace a declared dependency on a dynamic library with another one 36 | (DT_NEEDED): 37 | 38 | $ patchelf --replace-needed liboriginal.so.1 libreplacement.so.1 my-program 39 | 40 | This option can be give multiple times. 41 | 42 | 43 | AUTHOR 44 | 45 | Copyright 2004-2016 Eelco Dolstra . 46 | 47 | 48 | LICENSE 49 | 50 | This program is free software: you can redistribute it and/or modify 51 | it under the terms of the GNU General Public License as published by 52 | the Free Software Foundation, either version 3 of the License, or (at 53 | your option) any later version. 54 | 55 | This program is distributed in the hope that it will be useful, but 56 | WITHOUT ANY WARRANTY; without even the implied warranty of 57 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 58 | General Public License for more details. 59 | 60 | You should have received a copy of the GNU General Public License 61 | along with this program. If not, see . 62 | 63 | 64 | HOMEPAGE 65 | 66 | http://nixos.org/patchelf.html 67 | 68 | 69 | BUGS 70 | 71 | The `strip' command from binutils generated broken executables when 72 | applied to the output of patchelf (if `--set-rpath' or 73 | `--set-interpreter' with a larger path than the original is used). 74 | This appears to be a bug in binutils 75 | (http://bugs.strategoxt.org/browse/NIXPKGS-85). 76 | 77 | 78 | RELEASE HISTORY 79 | 80 | 0.9 (February 29, 2016): 81 | 82 | * Lots of new features. Please refer to the Git commit log: 83 | 84 | https://github.com/NixOS/patchelf/commits/master 85 | 86 | This release has contributions from Aaron D. Marasco, Adrien 87 | Devresse, Alexandre Pretyman, Changli Gao, Chingis Dugarzhapov, 88 | darealshinji, David Sveningsson, Eelco Dolstra, Felipe Sateler, 89 | Jeremy Sanders, Jonas Kuemmerlin, Thomas Tuegel, Tuomas Tynkkynen, 90 | Vincent Danjean and Vladimír Čunát. 91 | 92 | 0.8 (January 15, 2014): 93 | 94 | * Fix a segfault caused by certain illegal entries in symbol tables. 95 | 96 | 0.7 (January 7, 2014): 97 | 98 | * Rewrite section indices in symbol tables. This for instance allows 99 | gdb to show proper backtraces. 100 | 101 | * Added `--remove-needed' option. 102 | 103 | 0.6 (November 7, 2011): 104 | 105 | * Hacky support for executables created by the Gold linker. 106 | 107 | * Support segments with an alignment of 0 (contributed by Zack 108 | Weinberg). 109 | 110 | * Added a manual page (contributed by Jeremy Sanders 111 | ). 112 | 113 | 0.5 (November 4, 2009): 114 | 115 | * Various bugfixes. 116 | 117 | * `--force-rpath' now deletes the DT_RUNPATH if it is present. 118 | 119 | 0.4 (June 4, 2008): 120 | 121 | * Support for growing the RPATH on dynamic libraries. 122 | 123 | * IA-64 support (not tested) and related 64-bit fixes. 124 | 125 | * FreeBSD support. 126 | 127 | * `--set-rpath', `--shrink-rpath' and `--print-rpath' now prefer 128 | DT_RUNPATH over DT_RPATH, which is obsolete. When updating, if both 129 | are present, both are updated. If only DT_RPATH is present, it is 130 | converted to DT_RUNPATH unless `--force-rpath' is specified. If 131 | neither is present, a DT_RUNPATH is added unless `--force-rpath' is 132 | specified, in which case a DT_RPATH is added. 133 | 134 | 0.3 (May 24, 2007): 135 | 136 | * Support for 64-bit ELF binaries (such as on x86_64-linux). 137 | 138 | * Support for big-endian ELF binaries (such as on powerpc-linux). 139 | 140 | * Various bugfixes. 141 | 142 | 0.2 (January 15, 2007): 143 | 144 | * Provides a hack to get certain programs (such as the 145 | Belastingaangifte 2005) to work. 146 | 147 | 0.1 (October 11, 2005): 148 | 149 | * Initial release. 150 | 151 | -------------------------------------------------------------------------------- /aarch64-linux-android-patchelf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/aarch64-linux-android-patchelf -------------------------------------------------------------------------------- /arm-linux-androideabi-patchelf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/arm-linux-androideabi-patchelf -------------------------------------------------------------------------------- /build-aux/compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Wrapper for compilers which do not understand '-c -o'. 3 | 4 | scriptversion=2012-10-14.11; # UTC 5 | 6 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. 7 | # Written by Tom Tromey . 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # This file is maintained in Automake, please report 28 | # bugs to or send patches to 29 | # . 30 | 31 | nl=' 32 | ' 33 | 34 | # We need space, tab and new line, in precisely that order. Quoting is 35 | # there to prevent tools from complaining about whitespace usage. 36 | IFS=" "" $nl" 37 | 38 | file_conv= 39 | 40 | # func_file_conv build_file lazy 41 | # Convert a $build file to $host form and store it in $file 42 | # Currently only supports Windows hosts. If the determined conversion 43 | # type is listed in (the comma separated) LAZY, no conversion will 44 | # take place. 45 | func_file_conv () 46 | { 47 | file=$1 48 | case $file in 49 | / | /[!/]*) # absolute file, and not a UNC file 50 | if test -z "$file_conv"; then 51 | # lazily determine how to convert abs files 52 | case `uname -s` in 53 | MINGW*) 54 | file_conv=mingw 55 | ;; 56 | CYGWIN*) 57 | file_conv=cygwin 58 | ;; 59 | *) 60 | file_conv=wine 61 | ;; 62 | esac 63 | fi 64 | case $file_conv/,$2, in 65 | *,$file_conv,*) 66 | ;; 67 | mingw/*) 68 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` 69 | ;; 70 | cygwin/*) 71 | file=`cygpath -m "$file" || echo "$file"` 72 | ;; 73 | wine/*) 74 | file=`winepath -w "$file" || echo "$file"` 75 | ;; 76 | esac 77 | ;; 78 | esac 79 | } 80 | 81 | # func_cl_dashL linkdir 82 | # Make cl look for libraries in LINKDIR 83 | func_cl_dashL () 84 | { 85 | func_file_conv "$1" 86 | if test -z "$lib_path"; then 87 | lib_path=$file 88 | else 89 | lib_path="$lib_path;$file" 90 | fi 91 | linker_opts="$linker_opts -LIBPATH:$file" 92 | } 93 | 94 | # func_cl_dashl library 95 | # Do a library search-path lookup for cl 96 | func_cl_dashl () 97 | { 98 | lib=$1 99 | found=no 100 | save_IFS=$IFS 101 | IFS=';' 102 | for dir in $lib_path $LIB 103 | do 104 | IFS=$save_IFS 105 | if $shared && test -f "$dir/$lib.dll.lib"; then 106 | found=yes 107 | lib=$dir/$lib.dll.lib 108 | break 109 | fi 110 | if test -f "$dir/$lib.lib"; then 111 | found=yes 112 | lib=$dir/$lib.lib 113 | break 114 | fi 115 | if test -f "$dir/lib$lib.a"; then 116 | found=yes 117 | lib=$dir/lib$lib.a 118 | break 119 | fi 120 | done 121 | IFS=$save_IFS 122 | 123 | if test "$found" != yes; then 124 | lib=$lib.lib 125 | fi 126 | } 127 | 128 | # func_cl_wrapper cl arg... 129 | # Adjust compile command to suit cl 130 | func_cl_wrapper () 131 | { 132 | # Assume a capable shell 133 | lib_path= 134 | shared=: 135 | linker_opts= 136 | for arg 137 | do 138 | if test -n "$eat"; then 139 | eat= 140 | else 141 | case $1 in 142 | -o) 143 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 144 | eat=1 145 | case $2 in 146 | *.o | *.[oO][bB][jJ]) 147 | func_file_conv "$2" 148 | set x "$@" -Fo"$file" 149 | shift 150 | ;; 151 | *) 152 | func_file_conv "$2" 153 | set x "$@" -Fe"$file" 154 | shift 155 | ;; 156 | esac 157 | ;; 158 | -I) 159 | eat=1 160 | func_file_conv "$2" mingw 161 | set x "$@" -I"$file" 162 | shift 163 | ;; 164 | -I*) 165 | func_file_conv "${1#-I}" mingw 166 | set x "$@" -I"$file" 167 | shift 168 | ;; 169 | -l) 170 | eat=1 171 | func_cl_dashl "$2" 172 | set x "$@" "$lib" 173 | shift 174 | ;; 175 | -l*) 176 | func_cl_dashl "${1#-l}" 177 | set x "$@" "$lib" 178 | shift 179 | ;; 180 | -L) 181 | eat=1 182 | func_cl_dashL "$2" 183 | ;; 184 | -L*) 185 | func_cl_dashL "${1#-L}" 186 | ;; 187 | -static) 188 | shared=false 189 | ;; 190 | -Wl,*) 191 | arg=${1#-Wl,} 192 | save_ifs="$IFS"; IFS=',' 193 | for flag in $arg; do 194 | IFS="$save_ifs" 195 | linker_opts="$linker_opts $flag" 196 | done 197 | IFS="$save_ifs" 198 | ;; 199 | -Xlinker) 200 | eat=1 201 | linker_opts="$linker_opts $2" 202 | ;; 203 | -*) 204 | set x "$@" "$1" 205 | shift 206 | ;; 207 | *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) 208 | func_file_conv "$1" 209 | set x "$@" -Tp"$file" 210 | shift 211 | ;; 212 | *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) 213 | func_file_conv "$1" mingw 214 | set x "$@" "$file" 215 | shift 216 | ;; 217 | *) 218 | set x "$@" "$1" 219 | shift 220 | ;; 221 | esac 222 | fi 223 | shift 224 | done 225 | if test -n "$linker_opts"; then 226 | linker_opts="-link$linker_opts" 227 | fi 228 | exec "$@" $linker_opts 229 | exit 1 230 | } 231 | 232 | eat= 233 | 234 | case $1 in 235 | '') 236 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 237 | exit 1; 238 | ;; 239 | -h | --h*) 240 | cat <<\EOF 241 | Usage: compile [--help] [--version] PROGRAM [ARGS] 242 | 243 | Wrapper for compilers which do not understand '-c -o'. 244 | Remove '-o dest.o' from ARGS, run PROGRAM with the remaining 245 | arguments, and rename the output as expected. 246 | 247 | If you are trying to build a whole package this is not the 248 | right script to run: please start by reading the file 'INSTALL'. 249 | 250 | Report bugs to . 251 | EOF 252 | exit $? 253 | ;; 254 | -v | --v*) 255 | echo "compile $scriptversion" 256 | exit $? 257 | ;; 258 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) 259 | func_cl_wrapper "$@" # Doesn't return... 260 | ;; 261 | esac 262 | 263 | ofile= 264 | cfile= 265 | 266 | for arg 267 | do 268 | if test -n "$eat"; then 269 | eat= 270 | else 271 | case $1 in 272 | -o) 273 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 274 | # So we strip '-o arg' only if arg is an object. 275 | eat=1 276 | case $2 in 277 | *.o | *.obj) 278 | ofile=$2 279 | ;; 280 | *) 281 | set x "$@" -o "$2" 282 | shift 283 | ;; 284 | esac 285 | ;; 286 | *.c) 287 | cfile=$1 288 | set x "$@" "$1" 289 | shift 290 | ;; 291 | *) 292 | set x "$@" "$1" 293 | shift 294 | ;; 295 | esac 296 | fi 297 | shift 298 | done 299 | 300 | if test -z "$ofile" || test -z "$cfile"; then 301 | # If no '-o' option was seen then we might have been invoked from a 302 | # pattern rule where we don't need one. That is ok -- this is a 303 | # normal compilation that the losing compiler can handle. If no 304 | # '.c' file was seen then we are probably linking. That is also 305 | # ok. 306 | exec "$@" 307 | fi 308 | 309 | # Name of file we expect compiler to create. 310 | cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` 311 | 312 | # Create the lock directory. 313 | # Note: use '[/\\:.-]' here to ensure that we don't use the same name 314 | # that we are using for the .o file. Also, base the name on the expected 315 | # object file name, since that is what matters with a parallel build. 316 | lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d 317 | while true; do 318 | if mkdir "$lockdir" >/dev/null 2>&1; then 319 | break 320 | fi 321 | sleep 1 322 | done 323 | # FIXME: race condition here if user kills between mkdir and trap. 324 | trap "rmdir '$lockdir'; exit 1" 1 2 15 325 | 326 | # Run the compile. 327 | "$@" 328 | ret=$? 329 | 330 | if test -f "$cofile"; then 331 | test "$cofile" = "$ofile" || mv "$cofile" "$ofile" 332 | elif test -f "${cofile}bj"; then 333 | test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" 334 | fi 335 | 336 | rmdir "$lockdir" 337 | exit $ret 338 | 339 | # Local Variables: 340 | # mode: shell-script 341 | # sh-indentation: 2 342 | # eval: (add-hook 'write-file-hooks 'time-stamp) 343 | # time-stamp-start: "scriptversion=" 344 | # time-stamp-format: "%:y-%02m-%02d.%02H" 345 | # time-stamp-time-zone: "UTC" 346 | # time-stamp-end: "; # UTC" 347 | # End: 348 | -------------------------------------------------------------------------------- /build-aux/depcomp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # depcomp - compile a program generating dependencies as side-effects 3 | 4 | scriptversion=2013-05-30.07; # UTC 5 | 6 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. 7 | 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | # As a special exception to the GNU General Public License, if you 22 | # distribute this file as part of a program that contains a 23 | # configuration script generated by Autoconf, you may include it under 24 | # the same distribution terms that you use for the rest of that program. 25 | 26 | # Originally written by Alexandre Oliva . 27 | 28 | case $1 in 29 | '') 30 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 31 | exit 1; 32 | ;; 33 | -h | --h*) 34 | cat <<\EOF 35 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] 36 | 37 | Run PROGRAMS ARGS to compile a file, generating dependencies 38 | as side-effects. 39 | 40 | Environment variables: 41 | depmode Dependency tracking mode. 42 | source Source file read by 'PROGRAMS ARGS'. 43 | object Object file output by 'PROGRAMS ARGS'. 44 | DEPDIR directory where to store dependencies. 45 | depfile Dependency file to output. 46 | tmpdepfile Temporary file to use when outputting dependencies. 47 | libtool Whether libtool is used (yes/no). 48 | 49 | Report bugs to . 50 | EOF 51 | exit $? 52 | ;; 53 | -v | --v*) 54 | echo "depcomp $scriptversion" 55 | exit $? 56 | ;; 57 | esac 58 | 59 | # Get the directory component of the given path, and save it in the 60 | # global variables '$dir'. Note that this directory component will 61 | # be either empty or ending with a '/' character. This is deliberate. 62 | set_dir_from () 63 | { 64 | case $1 in 65 | */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; 66 | *) dir=;; 67 | esac 68 | } 69 | 70 | # Get the suffix-stripped basename of the given path, and save it the 71 | # global variable '$base'. 72 | set_base_from () 73 | { 74 | base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` 75 | } 76 | 77 | # If no dependency file was actually created by the compiler invocation, 78 | # we still have to create a dummy depfile, to avoid errors with the 79 | # Makefile "include basename.Plo" scheme. 80 | make_dummy_depfile () 81 | { 82 | echo "#dummy" > "$depfile" 83 | } 84 | 85 | # Factor out some common post-processing of the generated depfile. 86 | # Requires the auxiliary global variable '$tmpdepfile' to be set. 87 | aix_post_process_depfile () 88 | { 89 | # If the compiler actually managed to produce a dependency file, 90 | # post-process it. 91 | if test -f "$tmpdepfile"; then 92 | # Each line is of the form 'foo.o: dependency.h'. 93 | # Do two passes, one to just change these to 94 | # $object: dependency.h 95 | # and one to simply output 96 | # dependency.h: 97 | # which is needed to avoid the deleted-header problem. 98 | { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" 99 | sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" 100 | } > "$depfile" 101 | rm -f "$tmpdepfile" 102 | else 103 | make_dummy_depfile 104 | fi 105 | } 106 | 107 | # A tabulation character. 108 | tab=' ' 109 | # A newline character. 110 | nl=' 111 | ' 112 | # Character ranges might be problematic outside the C locale. 113 | # These definitions help. 114 | upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ 115 | lower=abcdefghijklmnopqrstuvwxyz 116 | digits=0123456789 117 | alpha=${upper}${lower} 118 | 119 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then 120 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 121 | exit 1 122 | fi 123 | 124 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 125 | depfile=${depfile-`echo "$object" | 126 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 127 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 128 | 129 | rm -f "$tmpdepfile" 130 | 131 | # Avoid interferences from the environment. 132 | gccflag= dashmflag= 133 | 134 | # Some modes work just like other modes, but use different flags. We 135 | # parameterize here, but still list the modes in the big case below, 136 | # to make depend.m4 easier to write. Note that we *cannot* use a case 137 | # here, because this file can only contain one case statement. 138 | if test "$depmode" = hp; then 139 | # HP compiler uses -M and no extra arg. 140 | gccflag=-M 141 | depmode=gcc 142 | fi 143 | 144 | if test "$depmode" = dashXmstdout; then 145 | # This is just like dashmstdout with a different argument. 146 | dashmflag=-xM 147 | depmode=dashmstdout 148 | fi 149 | 150 | cygpath_u="cygpath -u -f -" 151 | if test "$depmode" = msvcmsys; then 152 | # This is just like msvisualcpp but w/o cygpath translation. 153 | # Just convert the backslash-escaped backslashes to single forward 154 | # slashes to satisfy depend.m4 155 | cygpath_u='sed s,\\\\,/,g' 156 | depmode=msvisualcpp 157 | fi 158 | 159 | if test "$depmode" = msvc7msys; then 160 | # This is just like msvc7 but w/o cygpath translation. 161 | # Just convert the backslash-escaped backslashes to single forward 162 | # slashes to satisfy depend.m4 163 | cygpath_u='sed s,\\\\,/,g' 164 | depmode=msvc7 165 | fi 166 | 167 | if test "$depmode" = xlc; then 168 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. 169 | gccflag=-qmakedep=gcc,-MF 170 | depmode=gcc 171 | fi 172 | 173 | case "$depmode" in 174 | gcc3) 175 | ## gcc 3 implements dependency tracking that does exactly what 176 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like 177 | ## it if -MD -MP comes after the -MF stuff. Hmm. 178 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon 179 | ## the command line argument order; so add the flags where they 180 | ## appear in depend2.am. Note that the slowdown incurred here 181 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. 182 | for arg 183 | do 184 | case $arg in 185 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 186 | *) set fnord "$@" "$arg" ;; 187 | esac 188 | shift # fnord 189 | shift # $arg 190 | done 191 | "$@" 192 | stat=$? 193 | if test $stat -ne 0; then 194 | rm -f "$tmpdepfile" 195 | exit $stat 196 | fi 197 | mv "$tmpdepfile" "$depfile" 198 | ;; 199 | 200 | gcc) 201 | ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. 202 | ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. 203 | ## (see the conditional assignment to $gccflag above). 204 | ## There are various ways to get dependency output from gcc. Here's 205 | ## why we pick this rather obscure method: 206 | ## - Don't want to use -MD because we'd like the dependencies to end 207 | ## up in a subdir. Having to rename by hand is ugly. 208 | ## (We might end up doing this anyway to support other compilers.) 209 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 210 | ## -MM, not -M (despite what the docs say). Also, it might not be 211 | ## supported by the other compilers which use the 'gcc' depmode. 212 | ## - Using -M directly means running the compiler twice (even worse 213 | ## than renaming). 214 | if test -z "$gccflag"; then 215 | gccflag=-MD, 216 | fi 217 | "$@" -Wp,"$gccflag$tmpdepfile" 218 | stat=$? 219 | if test $stat -ne 0; then 220 | rm -f "$tmpdepfile" 221 | exit $stat 222 | fi 223 | rm -f "$depfile" 224 | echo "$object : \\" > "$depfile" 225 | # The second -e expression handles DOS-style file names with drive 226 | # letters. 227 | sed -e 's/^[^:]*: / /' \ 228 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 229 | ## This next piece of magic avoids the "deleted header file" problem. 230 | ## The problem is that when a header file which appears in a .P file 231 | ## is deleted, the dependency causes make to die (because there is 232 | ## typically no way to rebuild the header). We avoid this by adding 233 | ## dummy dependencies for each header file. Too bad gcc doesn't do 234 | ## this for us directly. 235 | ## Some versions of gcc put a space before the ':'. On the theory 236 | ## that the space means something, we add a space to the output as 237 | ## well. hp depmode also adds that space, but also prefixes the VPATH 238 | ## to the object. Take care to not repeat it in the output. 239 | ## Some versions of the HPUX 10.20 sed can't process this invocation 240 | ## correctly. Breaking it into two sed invocations is a workaround. 241 | tr ' ' "$nl" < "$tmpdepfile" \ 242 | | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ 243 | | sed -e 's/$/ :/' >> "$depfile" 244 | rm -f "$tmpdepfile" 245 | ;; 246 | 247 | hp) 248 | # This case exists only to let depend.m4 do its work. It works by 249 | # looking at the text of this script. This case will never be run, 250 | # since it is checked for above. 251 | exit 1 252 | ;; 253 | 254 | sgi) 255 | if test "$libtool" = yes; then 256 | "$@" "-Wp,-MDupdate,$tmpdepfile" 257 | else 258 | "$@" -MDupdate "$tmpdepfile" 259 | fi 260 | stat=$? 261 | if test $stat -ne 0; then 262 | rm -f "$tmpdepfile" 263 | exit $stat 264 | fi 265 | rm -f "$depfile" 266 | 267 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 268 | echo "$object : \\" > "$depfile" 269 | # Clip off the initial element (the dependent). Don't try to be 270 | # clever and replace this with sed code, as IRIX sed won't handle 271 | # lines with more than a fixed number of characters (4096 in 272 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 273 | # the IRIX cc adds comments like '#:fec' to the end of the 274 | # dependency line. 275 | tr ' ' "$nl" < "$tmpdepfile" \ 276 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ 277 | | tr "$nl" ' ' >> "$depfile" 278 | echo >> "$depfile" 279 | # The second pass generates a dummy entry for each header file. 280 | tr ' ' "$nl" < "$tmpdepfile" \ 281 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 282 | >> "$depfile" 283 | else 284 | make_dummy_depfile 285 | fi 286 | rm -f "$tmpdepfile" 287 | ;; 288 | 289 | xlc) 290 | # This case exists only to let depend.m4 do its work. It works by 291 | # looking at the text of this script. This case will never be run, 292 | # since it is checked for above. 293 | exit 1 294 | ;; 295 | 296 | aix) 297 | # The C for AIX Compiler uses -M and outputs the dependencies 298 | # in a .u file. In older versions, this file always lives in the 299 | # current directory. Also, the AIX compiler puts '$object:' at the 300 | # start of each line; $object doesn't have directory information. 301 | # Version 6 uses the directory in both cases. 302 | set_dir_from "$object" 303 | set_base_from "$object" 304 | if test "$libtool" = yes; then 305 | tmpdepfile1=$dir$base.u 306 | tmpdepfile2=$base.u 307 | tmpdepfile3=$dir.libs/$base.u 308 | "$@" -Wc,-M 309 | else 310 | tmpdepfile1=$dir$base.u 311 | tmpdepfile2=$dir$base.u 312 | tmpdepfile3=$dir$base.u 313 | "$@" -M 314 | fi 315 | stat=$? 316 | if test $stat -ne 0; then 317 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 318 | exit $stat 319 | fi 320 | 321 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 322 | do 323 | test -f "$tmpdepfile" && break 324 | done 325 | aix_post_process_depfile 326 | ;; 327 | 328 | tcc) 329 | # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 330 | # FIXME: That version still under development at the moment of writing. 331 | # Make that this statement remains true also for stable, released 332 | # versions. 333 | # It will wrap lines (doesn't matter whether long or short) with a 334 | # trailing '\', as in: 335 | # 336 | # foo.o : \ 337 | # foo.c \ 338 | # foo.h \ 339 | # 340 | # It will put a trailing '\' even on the last line, and will use leading 341 | # spaces rather than leading tabs (at least since its commit 0394caf7 342 | # "Emit spaces for -MD"). 343 | "$@" -MD -MF "$tmpdepfile" 344 | stat=$? 345 | if test $stat -ne 0; then 346 | rm -f "$tmpdepfile" 347 | exit $stat 348 | fi 349 | rm -f "$depfile" 350 | # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. 351 | # We have to change lines of the first kind to '$object: \'. 352 | sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" 353 | # And for each line of the second kind, we have to emit a 'dep.h:' 354 | # dummy dependency, to avoid the deleted-header problem. 355 | sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" 356 | rm -f "$tmpdepfile" 357 | ;; 358 | 359 | ## The order of this option in the case statement is important, since the 360 | ## shell code in configure will try each of these formats in the order 361 | ## listed in this file. A plain '-MD' option would be understood by many 362 | ## compilers, so we must ensure this comes after the gcc and icc options. 363 | pgcc) 364 | # Portland's C compiler understands '-MD'. 365 | # Will always output deps to 'file.d' where file is the root name of the 366 | # source file under compilation, even if file resides in a subdirectory. 367 | # The object file name does not affect the name of the '.d' file. 368 | # pgcc 10.2 will output 369 | # foo.o: sub/foo.c sub/foo.h 370 | # and will wrap long lines using '\' : 371 | # foo.o: sub/foo.c ... \ 372 | # sub/foo.h ... \ 373 | # ... 374 | set_dir_from "$object" 375 | # Use the source, not the object, to determine the base name, since 376 | # that's sadly what pgcc will do too. 377 | set_base_from "$source" 378 | tmpdepfile=$base.d 379 | 380 | # For projects that build the same source file twice into different object 381 | # files, the pgcc approach of using the *source* file root name can cause 382 | # problems in parallel builds. Use a locking strategy to avoid stomping on 383 | # the same $tmpdepfile. 384 | lockdir=$base.d-lock 385 | trap " 386 | echo '$0: caught signal, cleaning up...' >&2 387 | rmdir '$lockdir' 388 | exit 1 389 | " 1 2 13 15 390 | numtries=100 391 | i=$numtries 392 | while test $i -gt 0; do 393 | # mkdir is a portable test-and-set. 394 | if mkdir "$lockdir" 2>/dev/null; then 395 | # This process acquired the lock. 396 | "$@" -MD 397 | stat=$? 398 | # Release the lock. 399 | rmdir "$lockdir" 400 | break 401 | else 402 | # If the lock is being held by a different process, wait 403 | # until the winning process is done or we timeout. 404 | while test -d "$lockdir" && test $i -gt 0; do 405 | sleep 1 406 | i=`expr $i - 1` 407 | done 408 | fi 409 | i=`expr $i - 1` 410 | done 411 | trap - 1 2 13 15 412 | if test $i -le 0; then 413 | echo "$0: failed to acquire lock after $numtries attempts" >&2 414 | echo "$0: check lockdir '$lockdir'" >&2 415 | exit 1 416 | fi 417 | 418 | if test $stat -ne 0; then 419 | rm -f "$tmpdepfile" 420 | exit $stat 421 | fi 422 | rm -f "$depfile" 423 | # Each line is of the form `foo.o: dependent.h', 424 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. 425 | # Do two passes, one to just change these to 426 | # `$object: dependent.h' and one to simply `dependent.h:'. 427 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" 428 | # Some versions of the HPUX 10.20 sed can't process this invocation 429 | # correctly. Breaking it into two sed invocations is a workaround. 430 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ 431 | | sed -e 's/$/ :/' >> "$depfile" 432 | rm -f "$tmpdepfile" 433 | ;; 434 | 435 | hp2) 436 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 437 | # compilers, which have integrated preprocessors. The correct option 438 | # to use with these is +Maked; it writes dependencies to a file named 439 | # 'foo.d', which lands next to the object file, wherever that 440 | # happens to be. 441 | # Much of this is similar to the tru64 case; see comments there. 442 | set_dir_from "$object" 443 | set_base_from "$object" 444 | if test "$libtool" = yes; then 445 | tmpdepfile1=$dir$base.d 446 | tmpdepfile2=$dir.libs/$base.d 447 | "$@" -Wc,+Maked 448 | else 449 | tmpdepfile1=$dir$base.d 450 | tmpdepfile2=$dir$base.d 451 | "$@" +Maked 452 | fi 453 | stat=$? 454 | if test $stat -ne 0; then 455 | rm -f "$tmpdepfile1" "$tmpdepfile2" 456 | exit $stat 457 | fi 458 | 459 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 460 | do 461 | test -f "$tmpdepfile" && break 462 | done 463 | if test -f "$tmpdepfile"; then 464 | sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" 465 | # Add 'dependent.h:' lines. 466 | sed -ne '2,${ 467 | s/^ *// 468 | s/ \\*$// 469 | s/$/:/ 470 | p 471 | }' "$tmpdepfile" >> "$depfile" 472 | else 473 | make_dummy_depfile 474 | fi 475 | rm -f "$tmpdepfile" "$tmpdepfile2" 476 | ;; 477 | 478 | tru64) 479 | # The Tru64 compiler uses -MD to generate dependencies as a side 480 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. 481 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 482 | # dependencies in 'foo.d' instead, so we check for that too. 483 | # Subdirectories are respected. 484 | set_dir_from "$object" 485 | set_base_from "$object" 486 | 487 | if test "$libtool" = yes; then 488 | # Libtool generates 2 separate objects for the 2 libraries. These 489 | # two compilations output dependencies in $dir.libs/$base.o.d and 490 | # in $dir$base.o.d. We have to check for both files, because 491 | # one of the two compilations can be disabled. We should prefer 492 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 493 | # automatically cleaned when .libs/ is deleted, while ignoring 494 | # the former would cause a distcleancheck panic. 495 | tmpdepfile1=$dir$base.o.d # libtool 1.5 496 | tmpdepfile2=$dir.libs/$base.o.d # Likewise. 497 | tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 498 | "$@" -Wc,-MD 499 | else 500 | tmpdepfile1=$dir$base.d 501 | tmpdepfile2=$dir$base.d 502 | tmpdepfile3=$dir$base.d 503 | "$@" -MD 504 | fi 505 | 506 | stat=$? 507 | if test $stat -ne 0; then 508 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 509 | exit $stat 510 | fi 511 | 512 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 513 | do 514 | test -f "$tmpdepfile" && break 515 | done 516 | # Same post-processing that is required for AIX mode. 517 | aix_post_process_depfile 518 | ;; 519 | 520 | msvc7) 521 | if test "$libtool" = yes; then 522 | showIncludes=-Wc,-showIncludes 523 | else 524 | showIncludes=-showIncludes 525 | fi 526 | "$@" $showIncludes > "$tmpdepfile" 527 | stat=$? 528 | grep -v '^Note: including file: ' "$tmpdepfile" 529 | if test $stat -ne 0; then 530 | rm -f "$tmpdepfile" 531 | exit $stat 532 | fi 533 | rm -f "$depfile" 534 | echo "$object : \\" > "$depfile" 535 | # The first sed program below extracts the file names and escapes 536 | # backslashes for cygpath. The second sed program outputs the file 537 | # name when reading, but also accumulates all include files in the 538 | # hold buffer in order to output them again at the end. This only 539 | # works with sed implementations that can handle large buffers. 540 | sed < "$tmpdepfile" -n ' 541 | /^Note: including file: *\(.*\)/ { 542 | s//\1/ 543 | s/\\/\\\\/g 544 | p 545 | }' | $cygpath_u | sort -u | sed -n ' 546 | s/ /\\ /g 547 | s/\(.*\)/'"$tab"'\1 \\/p 548 | s/.\(.*\) \\/\1:/ 549 | H 550 | $ { 551 | s/.*/'"$tab"'/ 552 | G 553 | p 554 | }' >> "$depfile" 555 | echo >> "$depfile" # make sure the fragment doesn't end with a backslash 556 | rm -f "$tmpdepfile" 557 | ;; 558 | 559 | msvc7msys) 560 | # This case exists only to let depend.m4 do its work. It works by 561 | # looking at the text of this script. This case will never be run, 562 | # since it is checked for above. 563 | exit 1 564 | ;; 565 | 566 | #nosideeffect) 567 | # This comment above is used by automake to tell side-effect 568 | # dependency tracking mechanisms from slower ones. 569 | 570 | dashmstdout) 571 | # Important note: in order to support this mode, a compiler *must* 572 | # always write the preprocessed file to stdout, regardless of -o. 573 | "$@" || exit $? 574 | 575 | # Remove the call to Libtool. 576 | if test "$libtool" = yes; then 577 | while test "X$1" != 'X--mode=compile'; do 578 | shift 579 | done 580 | shift 581 | fi 582 | 583 | # Remove '-o $object'. 584 | IFS=" " 585 | for arg 586 | do 587 | case $arg in 588 | -o) 589 | shift 590 | ;; 591 | $object) 592 | shift 593 | ;; 594 | *) 595 | set fnord "$@" "$arg" 596 | shift # fnord 597 | shift # $arg 598 | ;; 599 | esac 600 | done 601 | 602 | test -z "$dashmflag" && dashmflag=-M 603 | # Require at least two characters before searching for ':' 604 | # in the target name. This is to cope with DOS-style filenames: 605 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. 606 | "$@" $dashmflag | 607 | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" 608 | rm -f "$depfile" 609 | cat < "$tmpdepfile" > "$depfile" 610 | # Some versions of the HPUX 10.20 sed can't process this sed invocation 611 | # correctly. Breaking it into two sed invocations is a workaround. 612 | tr ' ' "$nl" < "$tmpdepfile" \ 613 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ 614 | | sed -e 's/$/ :/' >> "$depfile" 615 | rm -f "$tmpdepfile" 616 | ;; 617 | 618 | dashXmstdout) 619 | # This case only exists to satisfy depend.m4. It is never actually 620 | # run, as this mode is specially recognized in the preamble. 621 | exit 1 622 | ;; 623 | 624 | makedepend) 625 | "$@" || exit $? 626 | # Remove any Libtool call 627 | if test "$libtool" = yes; then 628 | while test "X$1" != 'X--mode=compile'; do 629 | shift 630 | done 631 | shift 632 | fi 633 | # X makedepend 634 | shift 635 | cleared=no eat=no 636 | for arg 637 | do 638 | case $cleared in 639 | no) 640 | set ""; shift 641 | cleared=yes ;; 642 | esac 643 | if test $eat = yes; then 644 | eat=no 645 | continue 646 | fi 647 | case "$arg" in 648 | -D*|-I*) 649 | set fnord "$@" "$arg"; shift ;; 650 | # Strip any option that makedepend may not understand. Remove 651 | # the object too, otherwise makedepend will parse it as a source file. 652 | -arch) 653 | eat=yes ;; 654 | -*|$object) 655 | ;; 656 | *) 657 | set fnord "$@" "$arg"; shift ;; 658 | esac 659 | done 660 | obj_suffix=`echo "$object" | sed 's/^.*\././'` 661 | touch "$tmpdepfile" 662 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 663 | rm -f "$depfile" 664 | # makedepend may prepend the VPATH from the source file name to the object. 665 | # No need to regex-escape $object, excess matching of '.' is harmless. 666 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" 667 | # Some versions of the HPUX 10.20 sed can't process the last invocation 668 | # correctly. Breaking it into two sed invocations is a workaround. 669 | sed '1,2d' "$tmpdepfile" \ 670 | | tr ' ' "$nl" \ 671 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ 672 | | sed -e 's/$/ :/' >> "$depfile" 673 | rm -f "$tmpdepfile" "$tmpdepfile".bak 674 | ;; 675 | 676 | cpp) 677 | # Important note: in order to support this mode, a compiler *must* 678 | # always write the preprocessed file to stdout. 679 | "$@" || exit $? 680 | 681 | # Remove the call to Libtool. 682 | if test "$libtool" = yes; then 683 | while test "X$1" != 'X--mode=compile'; do 684 | shift 685 | done 686 | shift 687 | fi 688 | 689 | # Remove '-o $object'. 690 | IFS=" " 691 | for arg 692 | do 693 | case $arg in 694 | -o) 695 | shift 696 | ;; 697 | $object) 698 | shift 699 | ;; 700 | *) 701 | set fnord "$@" "$arg" 702 | shift # fnord 703 | shift # $arg 704 | ;; 705 | esac 706 | done 707 | 708 | "$@" -E \ 709 | | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 710 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 711 | | sed '$ s: \\$::' > "$tmpdepfile" 712 | rm -f "$depfile" 713 | echo "$object : \\" > "$depfile" 714 | cat < "$tmpdepfile" >> "$depfile" 715 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 716 | rm -f "$tmpdepfile" 717 | ;; 718 | 719 | msvisualcpp) 720 | # Important note: in order to support this mode, a compiler *must* 721 | # always write the preprocessed file to stdout. 722 | "$@" || exit $? 723 | 724 | # Remove the call to Libtool. 725 | if test "$libtool" = yes; then 726 | while test "X$1" != 'X--mode=compile'; do 727 | shift 728 | done 729 | shift 730 | fi 731 | 732 | IFS=" " 733 | for arg 734 | do 735 | case "$arg" in 736 | -o) 737 | shift 738 | ;; 739 | $object) 740 | shift 741 | ;; 742 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 743 | set fnord "$@" 744 | shift 745 | shift 746 | ;; 747 | *) 748 | set fnord "$@" "$arg" 749 | shift 750 | shift 751 | ;; 752 | esac 753 | done 754 | "$@" -E 2>/dev/null | 755 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" 756 | rm -f "$depfile" 757 | echo "$object : \\" > "$depfile" 758 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" 759 | echo "$tab" >> "$depfile" 760 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" 761 | rm -f "$tmpdepfile" 762 | ;; 763 | 764 | msvcmsys) 765 | # This case exists only to let depend.m4 do its work. It works by 766 | # looking at the text of this script. This case will never be run, 767 | # since it is checked for above. 768 | exit 1 769 | ;; 770 | 771 | none) 772 | exec "$@" 773 | ;; 774 | 775 | *) 776 | echo "Unknown depmode $depmode" 1>&2 777 | exit 1 778 | ;; 779 | esac 780 | 781 | exit 0 782 | 783 | # Local Variables: 784 | # mode: shell-script 785 | # sh-indentation: 2 786 | # eval: (add-hook 'write-file-hooks 'time-stamp) 787 | # time-stamp-start: "scriptversion=" 788 | # time-stamp-format: "%:y-%02m-%02d.%02H" 789 | # time-stamp-time-zone: "UTC" 790 | # time-stamp-end: "; # UTC" 791 | # End: 792 | -------------------------------------------------------------------------------- /build-aux/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2013-12-25.23; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # 'make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | tab=' ' 45 | nl=' 46 | ' 47 | IFS=" $tab$nl" 48 | 49 | # Set DOITPROG to "echo" to test this script. 50 | 51 | doit=${DOITPROG-} 52 | doit_exec=${doit:-exec} 53 | 54 | # Put in absolute file names if you don't have them in your path; 55 | # or use environment vars. 56 | 57 | chgrpprog=${CHGRPPROG-chgrp} 58 | chmodprog=${CHMODPROG-chmod} 59 | chownprog=${CHOWNPROG-chown} 60 | cmpprog=${CMPPROG-cmp} 61 | cpprog=${CPPROG-cp} 62 | mkdirprog=${MKDIRPROG-mkdir} 63 | mvprog=${MVPROG-mv} 64 | rmprog=${RMPROG-rm} 65 | stripprog=${STRIPPROG-strip} 66 | 67 | posix_mkdir= 68 | 69 | # Desired mode of installed file. 70 | mode=0755 71 | 72 | chgrpcmd= 73 | chmodcmd=$chmodprog 74 | chowncmd= 75 | mvcmd=$mvprog 76 | rmcmd="$rmprog -f" 77 | stripcmd= 78 | 79 | src= 80 | dst= 81 | dir_arg= 82 | dst_arg= 83 | 84 | copy_on_change=false 85 | is_target_a_directory=possibly 86 | 87 | usage="\ 88 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 89 | or: $0 [OPTION]... SRCFILES... DIRECTORY 90 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 91 | or: $0 [OPTION]... -d DIRECTORIES... 92 | 93 | In the 1st form, copy SRCFILE to DSTFILE. 94 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 95 | In the 4th, create DIRECTORIES. 96 | 97 | Options: 98 | --help display this help and exit. 99 | --version display version info and exit. 100 | 101 | -c (ignored) 102 | -C install only if different (preserve the last data modification time) 103 | -d create directories instead of installing files. 104 | -g GROUP $chgrpprog installed files to GROUP. 105 | -m MODE $chmodprog installed files to MODE. 106 | -o USER $chownprog installed files to USER. 107 | -s $stripprog installed files. 108 | -t DIRECTORY install into DIRECTORY. 109 | -T report an error if DSTFILE is a directory. 110 | 111 | Environment variables override the default commands: 112 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 113 | RMPROG STRIPPROG 114 | " 115 | 116 | while test $# -ne 0; do 117 | case $1 in 118 | -c) ;; 119 | 120 | -C) copy_on_change=true;; 121 | 122 | -d) dir_arg=true;; 123 | 124 | -g) chgrpcmd="$chgrpprog $2" 125 | shift;; 126 | 127 | --help) echo "$usage"; exit $?;; 128 | 129 | -m) mode=$2 130 | case $mode in 131 | *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) 132 | echo "$0: invalid mode: $mode" >&2 133 | exit 1;; 134 | esac 135 | shift;; 136 | 137 | -o) chowncmd="$chownprog $2" 138 | shift;; 139 | 140 | -s) stripcmd=$stripprog;; 141 | 142 | -t) 143 | is_target_a_directory=always 144 | dst_arg=$2 145 | # Protect names problematic for 'test' and other utilities. 146 | case $dst_arg in 147 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 148 | esac 149 | shift;; 150 | 151 | -T) is_target_a_directory=never;; 152 | 153 | --version) echo "$0 $scriptversion"; exit $?;; 154 | 155 | --) shift 156 | break;; 157 | 158 | -*) echo "$0: invalid option: $1" >&2 159 | exit 1;; 160 | 161 | *) break;; 162 | esac 163 | shift 164 | done 165 | 166 | # We allow the use of options -d and -T together, by making -d 167 | # take the precedence; this is for compatibility with GNU install. 168 | 169 | if test -n "$dir_arg"; then 170 | if test -n "$dst_arg"; then 171 | echo "$0: target directory not allowed when installing a directory." >&2 172 | exit 1 173 | fi 174 | fi 175 | 176 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 177 | # When -d is used, all remaining arguments are directories to create. 178 | # When -t is used, the destination is already specified. 179 | # Otherwise, the last argument is the destination. Remove it from $@. 180 | for arg 181 | do 182 | if test -n "$dst_arg"; then 183 | # $@ is not empty: it contains at least $arg. 184 | set fnord "$@" "$dst_arg" 185 | shift # fnord 186 | fi 187 | shift # arg 188 | dst_arg=$arg 189 | # Protect names problematic for 'test' and other utilities. 190 | case $dst_arg in 191 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 192 | esac 193 | done 194 | fi 195 | 196 | if test $# -eq 0; then 197 | if test -z "$dir_arg"; then 198 | echo "$0: no input file specified." >&2 199 | exit 1 200 | fi 201 | # It's OK to call 'install-sh -d' without argument. 202 | # This can happen when creating conditional directories. 203 | exit 0 204 | fi 205 | 206 | if test -z "$dir_arg"; then 207 | if test $# -gt 1 || test "$is_target_a_directory" = always; then 208 | if test ! -d "$dst_arg"; then 209 | echo "$0: $dst_arg: Is not a directory." >&2 210 | exit 1 211 | fi 212 | fi 213 | fi 214 | 215 | if test -z "$dir_arg"; then 216 | do_exit='(exit $ret); exit $ret' 217 | trap "ret=129; $do_exit" 1 218 | trap "ret=130; $do_exit" 2 219 | trap "ret=141; $do_exit" 13 220 | trap "ret=143; $do_exit" 15 221 | 222 | # Set umask so as not to create temps with too-generous modes. 223 | # However, 'strip' requires both read and write access to temps. 224 | case $mode in 225 | # Optimize common cases. 226 | *644) cp_umask=133;; 227 | *755) cp_umask=22;; 228 | 229 | *[0-7]) 230 | if test -z "$stripcmd"; then 231 | u_plus_rw= 232 | else 233 | u_plus_rw='% 200' 234 | fi 235 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 236 | *) 237 | if test -z "$stripcmd"; then 238 | u_plus_rw= 239 | else 240 | u_plus_rw=,u+rw 241 | fi 242 | cp_umask=$mode$u_plus_rw;; 243 | esac 244 | fi 245 | 246 | for src 247 | do 248 | # Protect names problematic for 'test' and other utilities. 249 | case $src in 250 | -* | [=\(\)!]) src=./$src;; 251 | esac 252 | 253 | if test -n "$dir_arg"; then 254 | dst=$src 255 | dstdir=$dst 256 | test -d "$dstdir" 257 | dstdir_status=$? 258 | else 259 | 260 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 261 | # might cause directories to be created, which would be especially bad 262 | # if $src (and thus $dsttmp) contains '*'. 263 | if test ! -f "$src" && test ! -d "$src"; then 264 | echo "$0: $src does not exist." >&2 265 | exit 1 266 | fi 267 | 268 | if test -z "$dst_arg"; then 269 | echo "$0: no destination specified." >&2 270 | exit 1 271 | fi 272 | dst=$dst_arg 273 | 274 | # If destination is a directory, append the input filename; won't work 275 | # if double slashes aren't ignored. 276 | if test -d "$dst"; then 277 | if test "$is_target_a_directory" = never; then 278 | echo "$0: $dst_arg: Is a directory" >&2 279 | exit 1 280 | fi 281 | dstdir=$dst 282 | dst=$dstdir/`basename "$src"` 283 | dstdir_status=0 284 | else 285 | dstdir=`dirname "$dst"` 286 | test -d "$dstdir" 287 | dstdir_status=$? 288 | fi 289 | fi 290 | 291 | obsolete_mkdir_used=false 292 | 293 | if test $dstdir_status != 0; then 294 | case $posix_mkdir in 295 | '') 296 | # Create intermediate dirs using mode 755 as modified by the umask. 297 | # This is like FreeBSD 'install' as of 1997-10-28. 298 | umask=`umask` 299 | case $stripcmd.$umask in 300 | # Optimize common cases. 301 | *[2367][2367]) mkdir_umask=$umask;; 302 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 303 | 304 | *[0-7]) 305 | mkdir_umask=`expr $umask + 22 \ 306 | - $umask % 100 % 40 + $umask % 20 \ 307 | - $umask % 10 % 4 + $umask % 2 308 | `;; 309 | *) mkdir_umask=$umask,go-w;; 310 | esac 311 | 312 | # With -d, create the new directory with the user-specified mode. 313 | # Otherwise, rely on $mkdir_umask. 314 | if test -n "$dir_arg"; then 315 | mkdir_mode=-m$mode 316 | else 317 | mkdir_mode= 318 | fi 319 | 320 | posix_mkdir=false 321 | case $umask in 322 | *[123567][0-7][0-7]) 323 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 324 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 325 | ;; 326 | *) 327 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 328 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 329 | 330 | if (umask $mkdir_umask && 331 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 332 | then 333 | if test -z "$dir_arg" || { 334 | # Check for POSIX incompatibilities with -m. 335 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 336 | # other-writable bit of parent directory when it shouldn't. 337 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 338 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 339 | case $ls_ld_tmpdir in 340 | d????-?r-*) different_mode=700;; 341 | d????-?--*) different_mode=755;; 342 | *) false;; 343 | esac && 344 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 345 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 346 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 347 | } 348 | } 349 | then posix_mkdir=: 350 | fi 351 | rmdir "$tmpdir/d" "$tmpdir" 352 | else 353 | # Remove any dirs left behind by ancient mkdir implementations. 354 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 355 | fi 356 | trap '' 0;; 357 | esac;; 358 | esac 359 | 360 | if 361 | $posix_mkdir && ( 362 | umask $mkdir_umask && 363 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 364 | ) 365 | then : 366 | else 367 | 368 | # The umask is ridiculous, or mkdir does not conform to POSIX, 369 | # or it failed possibly due to a race condition. Create the 370 | # directory the slow way, step by step, checking for races as we go. 371 | 372 | case $dstdir in 373 | /*) prefix='/';; 374 | [-=\(\)!]*) prefix='./';; 375 | *) prefix='';; 376 | esac 377 | 378 | oIFS=$IFS 379 | IFS=/ 380 | set -f 381 | set fnord $dstdir 382 | shift 383 | set +f 384 | IFS=$oIFS 385 | 386 | prefixes= 387 | 388 | for d 389 | do 390 | test X"$d" = X && continue 391 | 392 | prefix=$prefix$d 393 | if test -d "$prefix"; then 394 | prefixes= 395 | else 396 | if $posix_mkdir; then 397 | (umask=$mkdir_umask && 398 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 399 | # Don't fail if two instances are running concurrently. 400 | test -d "$prefix" || exit 1 401 | else 402 | case $prefix in 403 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 404 | *) qprefix=$prefix;; 405 | esac 406 | prefixes="$prefixes '$qprefix'" 407 | fi 408 | fi 409 | prefix=$prefix/ 410 | done 411 | 412 | if test -n "$prefixes"; then 413 | # Don't fail if two instances are running concurrently. 414 | (umask $mkdir_umask && 415 | eval "\$doit_exec \$mkdirprog $prefixes") || 416 | test -d "$dstdir" || exit 1 417 | obsolete_mkdir_used=true 418 | fi 419 | fi 420 | fi 421 | 422 | if test -n "$dir_arg"; then 423 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 424 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 425 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 426 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 427 | else 428 | 429 | # Make a couple of temp file names in the proper directory. 430 | dsttmp=$dstdir/_inst.$$_ 431 | rmtmp=$dstdir/_rm.$$_ 432 | 433 | # Trap to clean up those temp files at exit. 434 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 435 | 436 | # Copy the file name to the temp name. 437 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 438 | 439 | # and set any options; do chmod last to preserve setuid bits. 440 | # 441 | # If any of these fail, we abort the whole thing. If we want to 442 | # ignore errors from any of these, just make sure not to ignore 443 | # errors from the above "$doit $cpprog $src $dsttmp" command. 444 | # 445 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 446 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 447 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 448 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 449 | 450 | # If -C, don't bother to copy if it wouldn't change the file. 451 | if $copy_on_change && 452 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 453 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 454 | set -f && 455 | set X $old && old=:$2:$4:$5:$6 && 456 | set X $new && new=:$2:$4:$5:$6 && 457 | set +f && 458 | test "$old" = "$new" && 459 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 460 | then 461 | rm -f "$dsttmp" 462 | else 463 | # Rename the file to the real destination. 464 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 465 | 466 | # The rename failed, perhaps because mv can't rename something else 467 | # to itself, or perhaps because mv is so ancient that it does not 468 | # support -f. 469 | { 470 | # Now remove or move aside any old file at destination location. 471 | # We try this two ways since rm can't unlink itself on some 472 | # systems and the destination file might be busy for other 473 | # reasons. In this case, the final cleanup might fail but the new 474 | # file should still install successfully. 475 | { 476 | test ! -f "$dst" || 477 | $doit $rmcmd -f "$dst" 2>/dev/null || 478 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 479 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 480 | } || 481 | { echo "$0: cannot unlink or rename $dst" >&2 482 | (exit 1); exit 1 483 | } 484 | } && 485 | 486 | # Now rename the file to the real destination. 487 | $doit $mvcmd "$dsttmp" "$dst" 488 | } 489 | fi || exit 1 490 | 491 | trap '' 0 492 | fi 493 | done 494 | 495 | # Local variables: 496 | # eval: (add-hook 'write-file-hooks 'time-stamp) 497 | # time-stamp-start: "scriptversion=" 498 | # time-stamp-format: "%:y-%02m-%02d.%02H" 499 | # time-stamp-time-zone: "UTC" 500 | # time-stamp-end: "; # UTC" 501 | # End: 502 | -------------------------------------------------------------------------------- /build-aux/missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common wrapper for a few potentially missing GNU programs. 3 | 4 | scriptversion=2013-10-28.13; # UTC 5 | 6 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. 7 | # Originally written by Fran,cois Pinard , 1996. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | if test $# -eq 0; then 28 | echo 1>&2 "Try '$0 --help' for more information" 29 | exit 1 30 | fi 31 | 32 | case $1 in 33 | 34 | --is-lightweight) 35 | # Used by our autoconf macros to check whether the available missing 36 | # script is modern enough. 37 | exit 0 38 | ;; 39 | 40 | --run) 41 | # Back-compat with the calling convention used by older automake. 42 | shift 43 | ;; 44 | 45 | -h|--h|--he|--hel|--help) 46 | echo "\ 47 | $0 [OPTION]... PROGRAM [ARGUMENT]... 48 | 49 | Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due 50 | to PROGRAM being missing or too old. 51 | 52 | Options: 53 | -h, --help display this help and exit 54 | -v, --version output version information and exit 55 | 56 | Supported PROGRAM values: 57 | aclocal autoconf autoheader autom4te automake makeinfo 58 | bison yacc flex lex help2man 59 | 60 | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 61 | 'g' are ignored when checking the name. 62 | 63 | Send bug reports to ." 64 | exit $? 65 | ;; 66 | 67 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 68 | echo "missing $scriptversion (GNU Automake)" 69 | exit $? 70 | ;; 71 | 72 | -*) 73 | echo 1>&2 "$0: unknown '$1' option" 74 | echo 1>&2 "Try '$0 --help' for more information" 75 | exit 1 76 | ;; 77 | 78 | esac 79 | 80 | # Run the given program, remember its exit status. 81 | "$@"; st=$? 82 | 83 | # If it succeeded, we are done. 84 | test $st -eq 0 && exit 0 85 | 86 | # Also exit now if we it failed (or wasn't found), and '--version' was 87 | # passed; such an option is passed most likely to detect whether the 88 | # program is present and works. 89 | case $2 in --version|--help) exit $st;; esac 90 | 91 | # Exit code 63 means version mismatch. This often happens when the user 92 | # tries to use an ancient version of a tool on a file that requires a 93 | # minimum version. 94 | if test $st -eq 63; then 95 | msg="probably too old" 96 | elif test $st -eq 127; then 97 | # Program was missing. 98 | msg="missing on your system" 99 | else 100 | # Program was found and executed, but failed. Give up. 101 | exit $st 102 | fi 103 | 104 | perl_URL=http://www.perl.org/ 105 | flex_URL=http://flex.sourceforge.net/ 106 | gnu_software_URL=http://www.gnu.org/software 107 | 108 | program_details () 109 | { 110 | case $1 in 111 | aclocal|automake) 112 | echo "The '$1' program is part of the GNU Automake package:" 113 | echo "<$gnu_software_URL/automake>" 114 | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" 115 | echo "<$gnu_software_URL/autoconf>" 116 | echo "<$gnu_software_URL/m4/>" 117 | echo "<$perl_URL>" 118 | ;; 119 | autoconf|autom4te|autoheader) 120 | echo "The '$1' program is part of the GNU Autoconf package:" 121 | echo "<$gnu_software_URL/autoconf/>" 122 | echo "It also requires GNU m4 and Perl in order to run:" 123 | echo "<$gnu_software_URL/m4/>" 124 | echo "<$perl_URL>" 125 | ;; 126 | esac 127 | } 128 | 129 | give_advice () 130 | { 131 | # Normalize program name to check for. 132 | normalized_program=`echo "$1" | sed ' 133 | s/^gnu-//; t 134 | s/^gnu//; t 135 | s/^g//; t'` 136 | 137 | printf '%s\n' "'$1' is $msg." 138 | 139 | configure_deps="'configure.ac' or m4 files included by 'configure.ac'" 140 | case $normalized_program in 141 | autoconf*) 142 | echo "You should only need it if you modified 'configure.ac'," 143 | echo "or m4 files included by it." 144 | program_details 'autoconf' 145 | ;; 146 | autoheader*) 147 | echo "You should only need it if you modified 'acconfig.h' or" 148 | echo "$configure_deps." 149 | program_details 'autoheader' 150 | ;; 151 | automake*) 152 | echo "You should only need it if you modified 'Makefile.am' or" 153 | echo "$configure_deps." 154 | program_details 'automake' 155 | ;; 156 | aclocal*) 157 | echo "You should only need it if you modified 'acinclude.m4' or" 158 | echo "$configure_deps." 159 | program_details 'aclocal' 160 | ;; 161 | autom4te*) 162 | echo "You might have modified some maintainer files that require" 163 | echo "the 'autom4te' program to be rebuilt." 164 | program_details 'autom4te' 165 | ;; 166 | bison*|yacc*) 167 | echo "You should only need it if you modified a '.y' file." 168 | echo "You may want to install the GNU Bison package:" 169 | echo "<$gnu_software_URL/bison/>" 170 | ;; 171 | lex*|flex*) 172 | echo "You should only need it if you modified a '.l' file." 173 | echo "You may want to install the Fast Lexical Analyzer package:" 174 | echo "<$flex_URL>" 175 | ;; 176 | help2man*) 177 | echo "You should only need it if you modified a dependency" \ 178 | "of a man page." 179 | echo "You may want to install the GNU Help2man package:" 180 | echo "<$gnu_software_URL/help2man/>" 181 | ;; 182 | makeinfo*) 183 | echo "You should only need it if you modified a '.texi' file, or" 184 | echo "any other file indirectly affecting the aspect of the manual." 185 | echo "You might want to install the Texinfo package:" 186 | echo "<$gnu_software_URL/texinfo/>" 187 | echo "The spurious makeinfo call might also be the consequence of" 188 | echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" 189 | echo "want to install GNU make:" 190 | echo "<$gnu_software_URL/make/>" 191 | ;; 192 | *) 193 | echo "You might have modified some files without having the proper" 194 | echo "tools for further handling them. Check the 'README' file, it" 195 | echo "often tells you about the needed prerequisites for installing" 196 | echo "this package. You may also peek at any GNU archive site, in" 197 | echo "case some other package contains this missing '$1' program." 198 | ;; 199 | esac 200 | } 201 | 202 | give_advice "$1" | sed -e '1s/^/WARNING: /' \ 203 | -e '2,$s/^/ /' >&2 204 | 205 | # Propagate the correct exit status (expected to be 127 for a program 206 | # not found, 63 for a program that failed due to version mismatch). 207 | exit $st 208 | 209 | # Local variables: 210 | # eval: (add-hook 'write-file-hooks 'time-stamp) 211 | # time-stamp-start: "scriptversion=" 212 | # time-stamp-format: "%:y-%02m-%02d.%02H" 213 | # time-stamp-time-zone: "UTC" 214 | # time-stamp-end: "; # UTC" 215 | # End: 216 | -------------------------------------------------------------------------------- /build-aux/test-driver: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # test-driver - basic testsuite driver script. 3 | 4 | scriptversion=2013-07-13.22; # UTC 5 | 6 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | # As a special exception to the GNU General Public License, if you 22 | # distribute this file as part of a program that contains a 23 | # configuration script generated by Autoconf, you may include it under 24 | # the same distribution terms that you use for the rest of that program. 25 | 26 | # This file is maintained in Automake, please report 27 | # bugs to or send patches to 28 | # . 29 | 30 | # Make unconditional expansion of undefined variables an error. This 31 | # helps a lot in preventing typo-related bugs. 32 | set -u 33 | 34 | usage_error () 35 | { 36 | echo "$0: $*" >&2 37 | print_usage >&2 38 | exit 2 39 | } 40 | 41 | print_usage () 42 | { 43 | cat <$log_file 2>&1 108 | estatus=$? 109 | 110 | if test $enable_hard_errors = no && test $estatus -eq 99; then 111 | tweaked_estatus=1 112 | else 113 | tweaked_estatus=$estatus 114 | fi 115 | 116 | case $tweaked_estatus:$expect_failure in 117 | 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 118 | 0:*) col=$grn res=PASS recheck=no gcopy=no;; 119 | 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 120 | 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; 121 | *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; 122 | *:*) col=$red res=FAIL recheck=yes gcopy=yes;; 123 | esac 124 | 125 | # Report the test outcome and exit status in the logs, so that one can 126 | # know whether the test passed or failed simply by looking at the '.log' 127 | # file, without the need of also peaking into the corresponding '.trs' 128 | # file (automake bug#11814). 129 | echo "$res $test_name (exit status: $estatus)" >>$log_file 130 | 131 | # Report outcome to console. 132 | echo "${col}${res}${std}: $test_name" 133 | 134 | # Register the test result, and other relevant metadata. 135 | echo ":test-result: $res" > $trs_file 136 | echo ":global-test-result: $res" >> $trs_file 137 | echo ":recheck: $recheck" >> $trs_file 138 | echo ":copy-in-global-log: $gcopy" >> $trs_file 139 | 140 | # Local Variables: 141 | # mode: shell-script 142 | # sh-indentation: 2 143 | # eval: (add-hook 'write-file-hooks 'time-stamp) 144 | # time-stamp-start: "scriptversion=" 145 | # time-stamp-format: "%:y-%02m-%02d.%02H" 146 | # time-stamp-time-zone: "UTC" 147 | # time-stamp-end: "; # UTC" 148 | # End: 149 | -------------------------------------------------------------------------------- /config.log: -------------------------------------------------------------------------------- 1 | This file contains any messages produced by compilers while 2 | running configure, to aid debugging if configure makes a mistake. 3 | 4 | It was created by patchelf configure 0.9, which was 5 | generated by GNU Autoconf 2.69. Invocation command line was 6 | 7 | $ ./configure --host=aarch64-linux-android CC=aarch64-linux-android-gcc CXX=aarch64-linux-android-g++ CFLAGS=-static -O2 -fPIE LDFLAGS=-static -O2 -fPIE 8 | 9 | ## --------- ## 10 | ## Platform. ## 11 | ## --------- ## 12 | 13 | hostname = devil 14 | uname -m = x86_64 15 | uname -r = 4.4.0-2-deepin-amd64 16 | uname -s = Linux 17 | uname -v = #1 SMP Deepin 4.4.6-4 (2016-07-01) 18 | 19 | /usr/bin/uname -p = unknown 20 | /bin/uname -X = unknown 21 | 22 | /bin/arch = unknown 23 | /usr/bin/arch -k = unknown 24 | /usr/convex/getsysinfo = unknown 25 | /usr/bin/hostinfo = unknown 26 | /bin/machine = unknown 27 | /usr/bin/oslevel = unknown 28 | /bin/universe = unknown 29 | 30 | PATH: /home/crixec/Android/android-ndk-r11c 31 | PATH: /home/crixec/opt/jdk1.8.0_102/bin 32 | PATH: /home/crixec/opt/jdk1.8.0_102/jre/bin 33 | PATH: /home/crixec/opt/aarch64-linux-android/bin 34 | PATH: /home/crixec/opt/arm-linux-androideabi/bin 35 | PATH: /usr/local/bin 36 | PATH: /usr/bin 37 | PATH: /bin 38 | PATH: /usr/local/games 39 | PATH: /usr/games 40 | 41 | 42 | ## ----------- ## 43 | ## Core tests. ## 44 | ## ----------- ## 45 | 46 | configure:1885: checking for a BSD-compatible install 47 | configure:1953: result: /usr/bin/install -c 48 | configure:1964: checking whether build environment is sane 49 | configure:2019: result: yes 50 | configure:2078: checking for aarch64-linux-android-strip 51 | configure:2094: found /home/crixec/opt/aarch64-linux-android/bin/aarch64-linux-android-strip 52 | configure:2105: result: aarch64-linux-android-strip 53 | configure:2170: checking for a thread-safe mkdir -p 54 | configure:2209: result: /bin/mkdir -p 55 | configure:2216: checking for gawk 56 | configure:2232: found /usr/bin/gawk 57 | configure:2243: result: gawk 58 | configure:2254: checking whether make sets $(MAKE) 59 | configure:2276: result: yes 60 | configure:2305: checking whether make supports nested variables 61 | configure:2322: result: yes 62 | configure:2461: checking for style of include used by make 63 | configure:2489: result: GNU 64 | configure:2520: checking for aarch64-linux-android-gcc 65 | configure:2547: result: aarch64-linux-android-gcc 66 | configure:2816: checking for C compiler version 67 | configure:2825: aarch64-linux-android-gcc --version >&5 68 | aarch64-linux-android-gcc (GCC) 4.9.x 20150123 (prerelease) 69 | Copyright (C) 2014 Free Software Foundation, Inc. 70 | This is free software; see the source for copying conditions. There is NO 71 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 72 | 73 | configure:2836: $? = 0 74 | configure:2825: aarch64-linux-android-gcc -v >&5 75 | Using built-in specs. 76 | COLLECT_GCC=aarch64-linux-android-gcc 77 | COLLECT_LTO_WRAPPER=/home/crixec/opt/aarch64-linux-android/bin/../libexec/gcc/aarch64-linux-android/4.9.x/lto-wrapper 78 | Target: aarch64-linux-android 79 | Configured with: /usr/local/google/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/8ee0b8157b3409c4b84fff35696d6c90 --target=aarch64-linux-android --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --enable-bionic-libs --enable-libatomic-ifuncs=no --enable-initfini-array --disable-nls --prefix=/tmp/8ee0b8157b3409c4b84fff35696d6c90 --with-sysroot=/tmp/8ee0b8157b3409c4b84fff35696d6c90/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/8ee0b8157b3409c4b84fff35696d6c90/include/c++/4.9.x --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-ld=default --enable-threads --enable-eh-frame-hdr-for-static --enable-fix-cortex-a53-835769 --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --program-transform-name='s&^&aarch64-linux-android-&' --enable-gold 80 | Thread model: posix 81 | gcc version 4.9.x 20150123 (prerelease) (GCC) 82 | configure:2836: $? = 0 83 | configure:2825: aarch64-linux-android-gcc -V >&5 84 | aarch64-linux-android-gcc: error: unrecognized command line option '-V' 85 | aarch64-linux-android-gcc: fatal error: no input files 86 | compilation terminated. 87 | configure:2836: $? = 1 88 | configure:2825: aarch64-linux-android-gcc -qversion >&5 89 | aarch64-linux-android-gcc: error: unrecognized command line option '-qversion' 90 | aarch64-linux-android-gcc: fatal error: no input files 91 | compilation terminated. 92 | configure:2836: $? = 1 93 | configure:2856: checking whether the C compiler works 94 | configure:2878: aarch64-linux-android-gcc -static -O2 -fPIE -static -O2 -fPIE conftest.c >&5 95 | configure:2882: $? = 0 96 | configure:2930: result: yes 97 | configure:2933: checking for C compiler default output file name 98 | configure:2935: result: a.out 99 | configure:2941: checking for suffix of executables 100 | configure:2948: aarch64-linux-android-gcc -o conftest -static -O2 -fPIE -static -O2 -fPIE conftest.c >&5 101 | configure:2952: $? = 0 102 | configure:2974: result: 103 | configure:2996: checking whether we are cross compiling 104 | configure:3004: aarch64-linux-android-gcc -o conftest -static -O2 -fPIE -static -O2 -fPIE conftest.c >&5 105 | configure:3008: $? = 0 106 | configure:3015: ./conftest 107 | ./configure: line 3017: ./conftest: cannot execute binary file: Exec format error 108 | configure:3019: $? = 126 109 | configure:3034: result: yes 110 | configure:3039: checking for suffix of object files 111 | configure:3061: aarch64-linux-android-gcc -c -static -O2 -fPIE conftest.c >&5 112 | configure:3065: $? = 0 113 | configure:3086: result: o 114 | configure:3090: checking whether we are using the GNU C compiler 115 | configure:3109: aarch64-linux-android-gcc -c -static -O2 -fPIE conftest.c >&5 116 | configure:3109: $? = 0 117 | configure:3118: result: yes 118 | configure:3127: checking whether aarch64-linux-android-gcc accepts -g 119 | configure:3147: aarch64-linux-android-gcc -c -g conftest.c >&5 120 | configure:3147: $? = 0 121 | configure:3188: result: yes 122 | configure:3205: checking for aarch64-linux-android-gcc option to accept ISO C89 123 | configure:3268: aarch64-linux-android-gcc -c -static -O2 -fPIE conftest.c >&5 124 | configure:3268: $? = 0 125 | configure:3281: result: none needed 126 | configure:3306: checking whether aarch64-linux-android-gcc understands -c and -o together 127 | configure:3328: aarch64-linux-android-gcc -c conftest.c -o conftest2.o 128 | configure:3331: $? = 0 129 | configure:3328: aarch64-linux-android-gcc -c conftest.c -o conftest2.o 130 | configure:3331: $? = 0 131 | configure:3343: result: yes 132 | configure:3362: checking dependency style of aarch64-linux-android-gcc 133 | configure:3473: result: gcc3 134 | configure:3601: checking for C++ compiler version 135 | configure:3610: aarch64-linux-android-g++ --version >&5 136 | aarch64-linux-android-g++ (GCC) 4.9.x 20150123 (prerelease) 137 | Copyright (C) 2014 Free Software Foundation, Inc. 138 | This is free software; see the source for copying conditions. There is NO 139 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 140 | 141 | configure:3621: $? = 0 142 | configure:3610: aarch64-linux-android-g++ -v >&5 143 | Using built-in specs. 144 | COLLECT_GCC=aarch64-linux-android-g++ 145 | COLLECT_LTO_WRAPPER=/home/crixec/opt/aarch64-linux-android/bin/../libexec/gcc/aarch64-linux-android/4.9.x/lto-wrapper 146 | Target: aarch64-linux-android 147 | Configured with: /usr/local/google/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/8ee0b8157b3409c4b84fff35696d6c90 --target=aarch64-linux-android --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --enable-bionic-libs --enable-libatomic-ifuncs=no --enable-initfini-array --disable-nls --prefix=/tmp/8ee0b8157b3409c4b84fff35696d6c90 --with-sysroot=/tmp/8ee0b8157b3409c4b84fff35696d6c90/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/8ee0b8157b3409c4b84fff35696d6c90/include/c++/4.9.x --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-ld=default --enable-threads --enable-eh-frame-hdr-for-static --enable-fix-cortex-a53-835769 --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --program-transform-name='s&^&aarch64-linux-android-&' --enable-gold 148 | Thread model: posix 149 | gcc version 4.9.x 20150123 (prerelease) (GCC) 150 | configure:3621: $? = 0 151 | configure:3610: aarch64-linux-android-g++ -V >&5 152 | aarch64-linux-android-g++: error: unrecognized command line option '-V' 153 | aarch64-linux-android-g++: fatal error: no input files 154 | compilation terminated. 155 | configure:3621: $? = 1 156 | configure:3610: aarch64-linux-android-g++ -qversion >&5 157 | aarch64-linux-android-g++: error: unrecognized command line option '-qversion' 158 | aarch64-linux-android-g++: fatal error: no input files 159 | compilation terminated. 160 | configure:3621: $? = 1 161 | configure:3625: checking whether we are using the GNU C++ compiler 162 | configure:3644: aarch64-linux-android-g++ -c conftest.cpp >&5 163 | configure:3644: $? = 0 164 | configure:3653: result: yes 165 | configure:3662: checking whether aarch64-linux-android-g++ accepts -g 166 | configure:3682: aarch64-linux-android-g++ -c -g conftest.cpp >&5 167 | configure:3682: $? = 0 168 | configure:3723: result: yes 169 | configure:3748: checking dependency style of aarch64-linux-android-g++ 170 | configure:3859: result: gcc3 171 | configure:3897: result: Setting page size to 4096 172 | configure:4047: checking that generated files are newer than configure 173 | configure:4053: result: done 174 | configure:4080: creating ./config.status 175 | 176 | ## ---------------------- ## 177 | ## Running config.status. ## 178 | ## ---------------------- ## 179 | 180 | This file was extended by patchelf config.status 0.9, which was 181 | generated by GNU Autoconf 2.69. Invocation command line was 182 | 183 | CONFIG_FILES = 184 | CONFIG_HEADERS = 185 | CONFIG_LINKS = 186 | CONFIG_COMMANDS = 187 | $ ./config.status 188 | 189 | on devil 190 | 191 | config.status:781: creating Makefile 192 | config.status:781: creating src/Makefile 193 | config.status:781: creating tests/Makefile 194 | config.status:781: creating patchelf.spec 195 | config.status:953: executing depfiles commands 196 | 197 | ## ---------------- ## 198 | ## Cache variables. ## 199 | ## ---------------- ## 200 | 201 | ac_cv_c_compiler_gnu=yes 202 | ac_cv_cxx_compiler_gnu=yes 203 | ac_cv_env_CCC_set= 204 | ac_cv_env_CCC_value= 205 | ac_cv_env_CC_set=set 206 | ac_cv_env_CC_value=aarch64-linux-android-gcc 207 | ac_cv_env_CFLAGS_set=set 208 | ac_cv_env_CFLAGS_value='-static -O2 -fPIE' 209 | ac_cv_env_CPPFLAGS_set= 210 | ac_cv_env_CPPFLAGS_value= 211 | ac_cv_env_CXXFLAGS_set= 212 | ac_cv_env_CXXFLAGS_value= 213 | ac_cv_env_CXX_set=set 214 | ac_cv_env_CXX_value=aarch64-linux-android-g++ 215 | ac_cv_env_LDFLAGS_set=set 216 | ac_cv_env_LDFLAGS_value='-static -O2 -fPIE' 217 | ac_cv_env_LIBS_set= 218 | ac_cv_env_LIBS_value= 219 | ac_cv_env_build_alias_set= 220 | ac_cv_env_build_alias_value= 221 | ac_cv_env_host_alias_set=set 222 | ac_cv_env_host_alias_value=aarch64-linux-android 223 | ac_cv_env_target_alias_set= 224 | ac_cv_env_target_alias_value= 225 | ac_cv_objext=o 226 | ac_cv_path_install='/usr/bin/install -c' 227 | ac_cv_path_mkdir=/bin/mkdir 228 | ac_cv_prog_AWK=gawk 229 | ac_cv_prog_CC=aarch64-linux-android-gcc 230 | ac_cv_prog_STRIP=aarch64-linux-android-strip 231 | ac_cv_prog_cc_c89= 232 | ac_cv_prog_cc_g=yes 233 | ac_cv_prog_cxx_g=yes 234 | ac_cv_prog_make_make_set=yes 235 | am_cv_CC_dependencies_compiler_type=gcc3 236 | am_cv_CXX_dependencies_compiler_type=gcc3 237 | am_cv_make_support_nested_variables=yes 238 | am_cv_prog_cc_c_o=yes 239 | 240 | ## ----------------- ## 241 | ## Output variables. ## 242 | ## ----------------- ## 243 | 244 | ACLOCAL='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing aclocal-1.15' 245 | AMDEPBACKSLASH='\' 246 | AMDEP_FALSE='#' 247 | AMDEP_TRUE='' 248 | AMTAR='$${TAR-tar}' 249 | AM_BACKSLASH='\' 250 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 251 | AM_DEFAULT_VERBOSITY='1' 252 | AM_V='$(V)' 253 | AUTOCONF='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing autoconf' 254 | AUTOHEADER='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing autoheader' 255 | AUTOMAKE='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing automake-1.15' 256 | AWK='gawk' 257 | CC='aarch64-linux-android-gcc' 258 | CCDEPMODE='depmode=gcc3' 259 | CFLAGS='-static -O2 -fPIE' 260 | CPPFLAGS='' 261 | CXX='aarch64-linux-android-g++' 262 | CXXDEPMODE='depmode=gcc3' 263 | CXXFLAGS='-g -O2' 264 | CYGPATH_W='echo' 265 | DEFS='-DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"patchelf\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.9\" -DPAGESIZE=4096' 266 | DEPDIR='.deps' 267 | ECHO_C='' 268 | ECHO_N='-n' 269 | ECHO_T='' 270 | EXEEXT='' 271 | INSTALL_DATA='${INSTALL} -m 644' 272 | INSTALL_PROGRAM='${INSTALL}' 273 | INSTALL_SCRIPT='${INSTALL}' 274 | INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' 275 | LDFLAGS='-static -O2 -fPIE' 276 | LIBOBJS='' 277 | LIBS='' 278 | LTLIBOBJS='' 279 | MAKEINFO='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing makeinfo' 280 | MKDIR_P='/bin/mkdir -p' 281 | OBJEXT='o' 282 | PACKAGE='patchelf' 283 | PACKAGE_BUGREPORT='' 284 | PACKAGE_NAME='patchelf' 285 | PACKAGE_STRING='patchelf 0.9' 286 | PACKAGE_TARNAME='patchelf' 287 | PACKAGE_URL='' 288 | PACKAGE_VERSION='0.9' 289 | PATH_SEPARATOR=':' 290 | SET_MAKE='' 291 | SHELL='/bin/bash' 292 | STRIP='aarch64-linux-android-strip' 293 | VERSION='0.9' 294 | ac_ct_CC='' 295 | ac_ct_CXX='' 296 | am__EXEEXT_FALSE='' 297 | am__EXEEXT_TRUE='#' 298 | am__fastdepCC_FALSE='#' 299 | am__fastdepCC_TRUE='' 300 | am__fastdepCXX_FALSE='#' 301 | am__fastdepCXX_TRUE='' 302 | am__include='include' 303 | am__isrc='' 304 | am__leading_dot='.' 305 | am__nodep='_no' 306 | am__quote='' 307 | am__tar='$${TAR-tar} chof - "$$tardir"' 308 | am__untar='$${TAR-tar} xf -' 309 | bindir='${exec_prefix}/bin' 310 | build_alias='' 311 | datadir='${datarootdir}' 312 | datarootdir='${prefix}/share' 313 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 314 | dvidir='${docdir}' 315 | exec_prefix='${prefix}' 316 | host_alias='aarch64-linux-android' 317 | htmldir='${docdir}' 318 | includedir='${prefix}/include' 319 | infodir='${datarootdir}/info' 320 | install_sh='${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/install-sh' 321 | libdir='${exec_prefix}/lib' 322 | libexecdir='${exec_prefix}/libexec' 323 | localedir='${datarootdir}/locale' 324 | localstatedir='${prefix}/var' 325 | mandir='${datarootdir}/man' 326 | mkdir_p='$(MKDIR_P)' 327 | oldincludedir='/usr/include' 328 | pdfdir='${docdir}' 329 | prefix='/usr/local' 330 | program_transform_name='s,x,x,' 331 | psdir='${docdir}' 332 | sbindir='${exec_prefix}/sbin' 333 | sharedstatedir='${prefix}/com' 334 | sysconfdir='${prefix}/etc' 335 | target_alias='' 336 | 337 | ## ----------- ## 338 | ## confdefs.h. ## 339 | ## ----------- ## 340 | 341 | /* confdefs.h */ 342 | #define PACKAGE_NAME "patchelf" 343 | #define PACKAGE_TARNAME "patchelf" 344 | #define PACKAGE_VERSION "0.9" 345 | #define PACKAGE_STRING "patchelf 0.9" 346 | #define PACKAGE_BUGREPORT "" 347 | #define PACKAGE_URL "" 348 | #define PACKAGE "patchelf" 349 | #define VERSION "0.9" 350 | #define PAGESIZE 4096 351 | 352 | configure: exit 0 353 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([patchelf], m4_esyscmd([printf $(cat ./version)])) 2 | AC_CONFIG_SRCDIR([src/patchelf.cc]) 3 | AC_CONFIG_AUX_DIR([build-aux]) 4 | AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2 foreign color-tests parallel-tests]) 5 | 6 | AM_PROG_CC_C_O 7 | AC_PROG_CXX 8 | 9 | PAGESIZE=auto 10 | AC_ARG_WITH([page-size], 11 | AS_HELP_STRING([--with-page-size=SIZE], [Specify default pagesize (default auto)]), 12 | PAGESIZE=$withval 13 | ) 14 | 15 | if test "$PAGESIZE" = auto; then 16 | if type -p getconf &>/dev/null; then 17 | PAGESIZE=$(getconf PAGESIZE || getconf PAGE_SIZE) 18 | fi 19 | if test "$PAGESIZE" = auto -o -z "$PAGESIZE"; then 20 | PAGESIZE=4096 21 | fi 22 | fi 23 | 24 | AC_DEFINE_UNQUOTED(PAGESIZE, ${PAGESIZE}) 25 | AC_MSG_RESULT([Setting page size to ${PAGESIZE}]) 26 | 27 | AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile patchelf.spec]) 28 | AC_OUTPUT 29 | -------------------------------------------------------------------------------- /gen_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CROSS_COMPILE="$1" 3 | ./configure --host="${CROSS_COMPILE}" CC="${CROSS_COMPILE}-gcc" CXX="${CROSS_COMPILE}-g++" CFLAGS='-static -O2 -fPIE' LDFLAGS='-static -O2 -fPIE' 4 | -------------------------------------------------------------------------------- /patchelf.1: -------------------------------------------------------------------------------- 1 | .\" Process this file with 2 | .\" groff -man -Tascii foo.1 3 | .\" 4 | .TH PATCHELF 1 "JUNE 2010" PATCHELF "User Manuals" 5 | .SH NAME 6 | patchelf - Modify ELF files 7 | 8 | .SH SYNOPSIS 9 | .B patchelf 10 | .I OPTION 11 | .B 12 | .I FILE 13 | .B 14 | 15 | .SH DESCRIPTION 16 | 17 | PatchELF is a simple utility for modifying existing ELF executables 18 | and libraries. It can change the dynamic loader ("ELF interpreter") 19 | of executables and change the RPATH of executables and libraries. 20 | 21 | .SH OPTIONS 22 | 23 | The single option given operates on a given FILE, editing in place. 24 | 25 | .IP "--page-size SIZE" 26 | Uses the given page size instead of the default. 27 | 28 | .IP "--set-interpreter INTERPRETER" 29 | Change the dynamic loader ("ELF interpreter") of executable given to 30 | INTERPRETER. 31 | 32 | .IP --print-interpreter 33 | Prints the ELF interpreter of the executable. 34 | 35 | .IP --print-soname 36 | Prints DT_SONAME entry of .dynamic section. 37 | Raises an error if DT_SONAME doesn't exist. 38 | 39 | .IP "--set-soname SONAME" 40 | Sets DT_SONAME entry of a library to SONAME. 41 | 42 | .IP "--set-rpath RPATH" 43 | Change the RPATH of the executable or library to RPATH. 44 | 45 | .IP --remove-rpath 46 | Removes the DT_RPATH or DT_RUNPATH entry of the executable or library. 47 | 48 | .IP --shrink-rpath 49 | Remove from the RPATH all directories that do not contain a 50 | library referenced by DT_NEEDED fields of the executable or library. 51 | 52 | For instance, if an executable references one library libfoo.so, has 53 | an RPATH "/lib:/usr/lib:/foo/lib", and libfoo.so can only be found 54 | in /foo/lib, then the new RPATH will be "/foo/lib". 55 | 56 | .IP --print-rpath 57 | Prints the RPATH for an executable or library. 58 | 59 | .IP --force-rpath 60 | Forces the use of the obsolete DT_RPATH in the file instead of 61 | DT_RUNPATH. By default DT_RPATH is converted to DT_RUNPATH. 62 | 63 | .IP "--add-needed LIBRARY" 64 | Adds a declared dependency on a dynamic library (DT_NEEDED). 65 | This option can be give multiple times. 66 | 67 | .IP "--replace-needed LIB_ORIG LIB_NEW" 68 | Replaces a declared dependency on a dynamic library with another one (DT_NEEDED). 69 | This option can be give multiple times. 70 | 71 | .IP "--remove-needed LIBRARY" 72 | Removes a declared depency on LIBRARY (DT_NEEDED entry). This 73 | option can be given multiple times. 74 | 75 | .IP "--no-default-lib" 76 | Marks the object that the search for dependencies of this object will ignore any 77 | default library search paths. 78 | 79 | .IP --debug 80 | Prints details of the changes made to the input file. 81 | 82 | .IP --version 83 | Shows the version of patchelf. 84 | 85 | .SH AUTHOR 86 | Eelco Dolstra 87 | 88 | .SH "SEE ALSO" 89 | .BR elf (5), 90 | .BR ld.so (8) 91 | 92 | 93 | -------------------------------------------------------------------------------- /patchelf.spec: -------------------------------------------------------------------------------- 1 | Summary: A utility for patching ELF binaries 2 | 3 | Name: patchelf 4 | Version: 0.9 5 | Release: 1 6 | License: GPL 7 | Group: Development/Tools 8 | URL: http://nixos.org/patchelf.html 9 | Source0: %{name}-%{version}.tar.bz2 10 | BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 11 | Prefix: /usr 12 | 13 | %description 14 | 15 | PatchELF is a simple utility for modifing existing ELF executables and 16 | libraries. It can change the dynamic loader ("ELF interpreter") of 17 | executables and change the RPATH of executables and libraries. 18 | 19 | %prep 20 | %setup -q 21 | 22 | %build 23 | ./configure --prefix=%{_prefix} 24 | make 25 | make check 26 | 27 | %install 28 | rm -rf $RPM_BUILD_ROOT 29 | make DESTDIR=$RPM_BUILD_ROOT install 30 | # rpmbuild automatically strips... strip $RPM_BUILD_ROOT/%%{_bindir}/* || true 31 | 32 | %clean 33 | rm -rf $RPM_BUILD_ROOT 34 | 35 | %files 36 | %{_bindir}/patchelf 37 | %doc %{_docdir}/patchelf/README 38 | %{_mandir}/man1/patchelf.1.gz 39 | -------------------------------------------------------------------------------- /patchelf.spec.in: -------------------------------------------------------------------------------- 1 | Summary: A utility for patching ELF binaries 2 | 3 | Name: patchelf 4 | Version: @PACKAGE_VERSION@ 5 | Release: 1 6 | License: GPL 7 | Group: Development/Tools 8 | URL: http://nixos.org/patchelf.html 9 | Source0: %{name}-%{version}.tar.bz2 10 | BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 11 | Prefix: /usr 12 | 13 | %description 14 | 15 | PatchELF is a simple utility for modifing existing ELF executables and 16 | libraries. It can change the dynamic loader ("ELF interpreter") of 17 | executables and change the RPATH of executables and libraries. 18 | 19 | %prep 20 | %setup -q 21 | 22 | %build 23 | ./configure --prefix=%{_prefix} 24 | make 25 | make check 26 | 27 | %install 28 | rm -rf $RPM_BUILD_ROOT 29 | make DESTDIR=$RPM_BUILD_ROOT install 30 | # rpmbuild automatically strips... strip $RPM_BUILD_ROOT/%%{_bindir}/* || true 31 | 32 | %clean 33 | rm -rf $RPM_BUILD_ROOT 34 | 35 | %files 36 | %{_bindir}/patchelf 37 | %doc %{_docdir}/patchelf/README 38 | %{_mandir}/man1/patchelf.1.gz 39 | -------------------------------------------------------------------------------- /src/.deps/patchelf.Po: -------------------------------------------------------------------------------- 1 | patchelf.o: patchelf.cc \ 2 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/string \ 3 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++config.h \ 4 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/os_defines.h \ 5 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/cpu_defines.h \ 6 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stringfwd.h \ 7 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/memoryfwd.h \ 8 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/char_traits.h \ 9 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_algobase.h \ 10 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/functexcept.h \ 11 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/exception_defines.h \ 12 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/cpp_type_traits.h \ 13 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/type_traits.h \ 14 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/numeric_traits.h \ 15 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_pair.h \ 16 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/move.h \ 17 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/concept_check.h \ 18 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator_base_types.h \ 19 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator_base_funcs.h \ 20 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/debug/debug.h \ 21 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator.h \ 22 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/ptr_traits.h \ 23 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/predefined_ops.h \ 24 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/postypes.h \ 25 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cwchar \ 26 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/wchar.h \ 27 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/cdefs.h \ 28 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/cdefs_elf.h \ 29 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/android/api-level.h \ 30 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdio.h \ 31 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/types.h \ 32 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stddef.h \ 33 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stdint.h \ 34 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdint.h \ 35 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/machine/wchar_limits.h \ 36 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/types.h \ 37 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/types.h \ 38 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/types.h \ 39 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/int-ll64.h \ 40 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/bitsperlong.h \ 41 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/bitsperlong.h \ 42 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/posix_types.h \ 43 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/stddef.h \ 44 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/compiler.h \ 45 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/posix_types.h \ 46 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/posix_types.h \ 47 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/sysmacros.h \ 48 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stdarg.h \ 49 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/time.h \ 50 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/time.h \ 51 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/time.h \ 52 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/xlocale.h \ 53 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/allocator.h \ 54 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++allocator.h \ 55 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/new_allocator.h \ 56 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/new \ 57 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/exception \ 58 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/atomic_lockfree_defines.h \ 59 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/localefwd.h \ 60 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++locale.h \ 61 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/clocale \ 62 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/locale.h \ 63 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/iosfwd \ 64 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cctype \ 65 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/ctype.h \ 66 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/ostream_insert.h \ 67 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/cxxabi_forced.h \ 68 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_function.h \ 69 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/backward/binders.h \ 70 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/range_access.h \ 71 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/basic_string.h \ 72 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/atomicity.h \ 73 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/gthr.h \ 74 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/gthr-default.h \ 75 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/pthread.h \ 76 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/signal.h \ 77 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/errno.h \ 78 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/errno.h \ 79 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/errno.h \ 80 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/errno.h \ 81 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/errno-base.h \ 82 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include-fixed/limits.h \ 83 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include-fixed/syslimits.h \ 84 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/limits.h \ 85 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/limits.h \ 86 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/limits.h \ 87 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/syslimits.h \ 88 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/string.h \ 89 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/malloc.h \ 90 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/sigcontext.h \ 91 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/signal.h \ 92 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/signal.h \ 93 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/signal.h \ 94 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/signal-defs.h \ 95 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/siginfo.h \ 96 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/siginfo.h \ 97 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/ucontext.h \ 98 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/user.h \ 99 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sched.h \ 100 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/sched.h \ 101 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/atomic_word.h \ 102 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/basic_string.tcc \ 103 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/vector \ 104 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_construct.h \ 105 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/alloc_traits.h \ 106 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_uninitialized.h \ 107 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_vector.h \ 108 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_bvector.h \ 109 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/vector.tcc \ 110 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/set \ 111 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_tree.h \ 112 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_set.h \ 113 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_multiset.h \ 114 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/map \ 115 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_map.h \ 116 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_multimap.h \ 117 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/algorithm \ 118 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/utility \ 119 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_relops.h \ 120 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_algo.h \ 121 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cstdlib \ 122 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdlib.h \ 123 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/alloca.h \ 124 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/strings.h \ 125 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/memory.h \ 126 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/algorithmfwd.h \ 127 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_heap.h \ 128 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_tempbuf.h \ 129 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/assert.h \ 130 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/stat.h \ 131 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/stat.h \ 132 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/endian.h \ 133 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/endian.h \ 134 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/unistd.h \ 135 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/select.h \ 136 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/sysconf.h \ 137 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/pathconf.h \ 138 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/fcntl.h \ 139 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/fadvise.h \ 140 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/fcntl.h \ 141 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/fcntl.h \ 142 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/fcntl.h \ 143 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/uio.h \ 144 | elf.h 145 | 146 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/string: 147 | 148 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++config.h: 149 | 150 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/os_defines.h: 151 | 152 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/cpu_defines.h: 153 | 154 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stringfwd.h: 155 | 156 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/memoryfwd.h: 157 | 158 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/char_traits.h: 159 | 160 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_algobase.h: 161 | 162 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/functexcept.h: 163 | 164 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/exception_defines.h: 165 | 166 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/cpp_type_traits.h: 167 | 168 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/type_traits.h: 169 | 170 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/numeric_traits.h: 171 | 172 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_pair.h: 173 | 174 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/move.h: 175 | 176 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/concept_check.h: 177 | 178 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator_base_types.h: 179 | 180 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator_base_funcs.h: 181 | 182 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/debug/debug.h: 183 | 184 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_iterator.h: 185 | 186 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/ptr_traits.h: 187 | 188 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/predefined_ops.h: 189 | 190 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/postypes.h: 191 | 192 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cwchar: 193 | 194 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/wchar.h: 195 | 196 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/cdefs.h: 197 | 198 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/cdefs_elf.h: 199 | 200 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/android/api-level.h: 201 | 202 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdio.h: 203 | 204 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/types.h: 205 | 206 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stddef.h: 207 | 208 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stdint.h: 209 | 210 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdint.h: 211 | 212 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/machine/wchar_limits.h: 213 | 214 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/types.h: 215 | 216 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/types.h: 217 | 218 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/types.h: 219 | 220 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/int-ll64.h: 221 | 222 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/bitsperlong.h: 223 | 224 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/bitsperlong.h: 225 | 226 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/posix_types.h: 227 | 228 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/stddef.h: 229 | 230 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/compiler.h: 231 | 232 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/posix_types.h: 233 | 234 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/posix_types.h: 235 | 236 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/sysmacros.h: 237 | 238 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include/stdarg.h: 239 | 240 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/time.h: 241 | 242 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/time.h: 243 | 244 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/time.h: 245 | 246 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/xlocale.h: 247 | 248 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/allocator.h: 249 | 250 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++allocator.h: 251 | 252 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/new_allocator.h: 253 | 254 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/new: 255 | 256 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/exception: 257 | 258 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/atomic_lockfree_defines.h: 259 | 260 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/localefwd.h: 261 | 262 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/c++locale.h: 263 | 264 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/clocale: 265 | 266 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/locale.h: 267 | 268 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/iosfwd: 269 | 270 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cctype: 271 | 272 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/ctype.h: 273 | 274 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/ostream_insert.h: 275 | 276 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/cxxabi_forced.h: 277 | 278 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_function.h: 279 | 280 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/backward/binders.h: 281 | 282 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/range_access.h: 283 | 284 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/basic_string.h: 285 | 286 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/atomicity.h: 287 | 288 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/gthr.h: 289 | 290 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/gthr-default.h: 291 | 292 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/pthread.h: 293 | 294 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/signal.h: 295 | 296 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/errno.h: 297 | 298 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/errno.h: 299 | 300 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/errno.h: 301 | 302 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/errno.h: 303 | 304 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/errno-base.h: 305 | 306 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include-fixed/limits.h: 307 | 308 | /home/crixec/opt/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x/include-fixed/syslimits.h: 309 | 310 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/limits.h: 311 | 312 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/limits.h: 313 | 314 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/limits.h: 315 | 316 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/syslimits.h: 317 | 318 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/string.h: 319 | 320 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/malloc.h: 321 | 322 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/sigcontext.h: 323 | 324 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/signal.h: 325 | 326 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/signal.h: 327 | 328 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/signal.h: 329 | 330 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/signal-defs.h: 331 | 332 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/siginfo.h: 333 | 334 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/siginfo.h: 335 | 336 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/ucontext.h: 337 | 338 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/user.h: 339 | 340 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sched.h: 341 | 342 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/sched.h: 343 | 344 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/aarch64-linux-android/bits/atomic_word.h: 345 | 346 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/basic_string.tcc: 347 | 348 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/vector: 349 | 350 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_construct.h: 351 | 352 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/ext/alloc_traits.h: 353 | 354 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_uninitialized.h: 355 | 356 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_vector.h: 357 | 358 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_bvector.h: 359 | 360 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/vector.tcc: 361 | 362 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/set: 363 | 364 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_tree.h: 365 | 366 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_set.h: 367 | 368 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_multiset.h: 369 | 370 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/map: 371 | 372 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_map.h: 373 | 374 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_multimap.h: 375 | 376 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/algorithm: 377 | 378 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/utility: 379 | 380 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_relops.h: 381 | 382 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_algo.h: 383 | 384 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/cstdlib: 385 | 386 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/stdlib.h: 387 | 388 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/alloca.h: 389 | 390 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/strings.h: 391 | 392 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/memory.h: 393 | 394 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/algorithmfwd.h: 395 | 396 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_heap.h: 397 | 398 | /home/crixec/opt/aarch64-linux-android/include/c++/4.9.x/bits/stl_tempbuf.h: 399 | 400 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/assert.h: 401 | 402 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/stat.h: 403 | 404 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/stat.h: 405 | 406 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/endian.h: 407 | 408 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/endian.h: 409 | 410 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/unistd.h: 411 | 412 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/select.h: 413 | 414 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/sys/sysconf.h: 415 | 416 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/pathconf.h: 417 | 418 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/fcntl.h: 419 | 420 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/fadvise.h: 421 | 422 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/fcntl.h: 423 | 424 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm/fcntl.h: 425 | 426 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/asm-generic/fcntl.h: 427 | 428 | /home/crixec/opt/aarch64-linux-android/sysroot/usr/include/linux/uio.h: 429 | 430 | elf.h: 431 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.15 from Makefile.am. 2 | # src/Makefile. Generated from Makefile.in by configure. 3 | 4 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | 16 | 17 | 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/patchelf 74 | pkgincludedir = $(includedir)/patchelf 75 | pkglibdir = $(libdir)/patchelf 76 | pkglibexecdir = $(libexecdir)/patchelf 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | bin_PROGRAMS = patchelf$(EXEEXT) 90 | subdir = src 91 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 92 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 93 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 94 | $(ACLOCAL_M4) 95 | DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 96 | mkinstalldirs = $(install_sh) -d 97 | CONFIG_CLEAN_FILES = 98 | CONFIG_CLEAN_VPATH_FILES = 99 | am__installdirs = "$(DESTDIR)$(bindir)" 100 | PROGRAMS = $(bin_PROGRAMS) 101 | am_patchelf_OBJECTS = patchelf.$(OBJEXT) 102 | patchelf_OBJECTS = $(am_patchelf_OBJECTS) 103 | patchelf_LDADD = $(LDADD) 104 | AM_V_P = $(am__v_P_$(V)) 105 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) 106 | am__v_P_0 = false 107 | am__v_P_1 = : 108 | AM_V_GEN = $(am__v_GEN_$(V)) 109 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 110 | am__v_GEN_0 = @echo " GEN " $@; 111 | am__v_GEN_1 = 112 | AM_V_at = $(am__v_at_$(V)) 113 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) 114 | am__v_at_0 = @ 115 | am__v_at_1 = 116 | DEFAULT_INCLUDES = -I. 117 | depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp 118 | am__depfiles_maybe = depfiles 119 | am__mv = mv -f 120 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 121 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 122 | AM_V_CXX = $(am__v_CXX_$(V)) 123 | am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) 124 | am__v_CXX_0 = @echo " CXX " $@; 125 | am__v_CXX_1 = 126 | CXXLD = $(CXX) 127 | CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 128 | -o $@ 129 | AM_V_CXXLD = $(am__v_CXXLD_$(V)) 130 | am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) 131 | am__v_CXXLD_0 = @echo " CXXLD " $@; 132 | am__v_CXXLD_1 = 133 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 134 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 135 | AM_V_CC = $(am__v_CC_$(V)) 136 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) 137 | am__v_CC_0 = @echo " CC " $@; 138 | am__v_CC_1 = 139 | CCLD = $(CC) 140 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 141 | AM_V_CCLD = $(am__v_CCLD_$(V)) 142 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) 143 | am__v_CCLD_0 = @echo " CCLD " $@; 144 | am__v_CCLD_1 = 145 | SOURCES = $(patchelf_SOURCES) 146 | DIST_SOURCES = $(patchelf_SOURCES) 147 | am__can_run_installinfo = \ 148 | case $$AM_UPDATE_INFO_DIR in \ 149 | n|no|NO) false;; \ 150 | *) (install-info --version) >/dev/null 2>&1;; \ 151 | esac 152 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 153 | # Read a list of newline-separated strings from the standard input, 154 | # and print each of them once, without duplicates. Input order is 155 | # *not* preserved. 156 | am__uniquify_input = $(AWK) '\ 157 | BEGIN { nonempty = 0; } \ 158 | { items[$$0] = 1; nonempty = 1; } \ 159 | END { if (nonempty) { for (i in items) print i; }; } \ 160 | ' 161 | # Make sure the list of sources is unique. This is necessary because, 162 | # e.g., the same source file might be shared among _SOURCES variables 163 | # for different programs/libraries. 164 | am__define_uniq_tagged_files = \ 165 | list='$(am__tagged_files)'; \ 166 | unique=`for i in $$list; do \ 167 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 168 | done | $(am__uniquify_input)` 169 | ETAGS = etags 170 | CTAGS = ctags 171 | am__DIST_COMMON = $(srcdir)/Makefile.in \ 172 | $(top_srcdir)/build-aux/depcomp 173 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 174 | ACLOCAL = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing aclocal-1.15 175 | AMTAR = $${TAR-tar} 176 | AM_DEFAULT_VERBOSITY = 1 177 | AUTOCONF = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing autoconf 178 | AUTOHEADER = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing autoheader 179 | AUTOMAKE = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing automake-1.15 180 | AWK = gawk 181 | CC = aarch64-linux-android-gcc 182 | CCDEPMODE = depmode=gcc3 183 | CFLAGS = -static -O2 -fPIE 184 | CPPFLAGS = 185 | CXX = aarch64-linux-android-g++ 186 | CXXDEPMODE = depmode=gcc3 187 | CXXFLAGS = -g -O2 188 | CYGPATH_W = echo 189 | DEFS = -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"patchelf\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.9\" -DPAGESIZE=4096 190 | DEPDIR = .deps 191 | ECHO_C = 192 | ECHO_N = -n 193 | ECHO_T = 194 | EXEEXT = 195 | INSTALL = /usr/bin/install -c 196 | INSTALL_DATA = ${INSTALL} -m 644 197 | INSTALL_PROGRAM = ${INSTALL} 198 | INSTALL_SCRIPT = ${INSTALL} 199 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s 200 | LDFLAGS = -static -O2 -fPIE 201 | LIBOBJS = 202 | LIBS = 203 | LTLIBOBJS = 204 | MAKEINFO = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/missing makeinfo 205 | MKDIR_P = /bin/mkdir -p 206 | OBJEXT = o 207 | PACKAGE = patchelf 208 | PACKAGE_BUGREPORT = 209 | PACKAGE_NAME = patchelf 210 | PACKAGE_STRING = patchelf 0.9 211 | PACKAGE_TARNAME = patchelf 212 | PACKAGE_URL = 213 | PACKAGE_VERSION = 0.9 214 | PATH_SEPARATOR = : 215 | SET_MAKE = 216 | SHELL = /bin/bash 217 | STRIP = aarch64-linux-android-strip 218 | VERSION = 0.9 219 | abs_builddir = /home/crixec/workspace/cross/patchelf-0.9/src 220 | abs_srcdir = /home/crixec/workspace/cross/patchelf-0.9/src 221 | abs_top_builddir = /home/crixec/workspace/cross/patchelf-0.9 222 | abs_top_srcdir = /home/crixec/workspace/cross/patchelf-0.9 223 | ac_ct_CC = 224 | ac_ct_CXX = 225 | am__include = include 226 | am__leading_dot = . 227 | am__quote = 228 | am__tar = $${TAR-tar} chof - "$$tardir" 229 | am__untar = $${TAR-tar} xf - 230 | bindir = ${exec_prefix}/bin 231 | build_alias = 232 | builddir = . 233 | datadir = ${datarootdir} 234 | datarootdir = ${prefix}/share 235 | docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} 236 | dvidir = ${docdir} 237 | exec_prefix = ${prefix} 238 | host_alias = aarch64-linux-android 239 | htmldir = ${docdir} 240 | includedir = ${prefix}/include 241 | infodir = ${datarootdir}/info 242 | install_sh = ${SHELL} /home/crixec/workspace/cross/patchelf-0.9/build-aux/install-sh 243 | libdir = ${exec_prefix}/lib 244 | libexecdir = ${exec_prefix}/libexec 245 | localedir = ${datarootdir}/locale 246 | localstatedir = ${prefix}/var 247 | mandir = ${datarootdir}/man 248 | mkdir_p = $(MKDIR_P) 249 | oldincludedir = /usr/include 250 | pdfdir = ${docdir} 251 | prefix = /usr/local 252 | program_transform_name = s,x,x, 253 | psdir = ${docdir} 254 | sbindir = ${exec_prefix}/sbin 255 | sharedstatedir = ${prefix}/com 256 | srcdir = . 257 | sysconfdir = ${prefix}/etc 258 | target_alias = 259 | top_build_prefix = ../ 260 | top_builddir = .. 261 | top_srcdir = .. 262 | AM_CXXFLAGS = -Wall 263 | patchelf_SOURCES = patchelf.cc elf.h 264 | all: all-am 265 | 266 | .SUFFIXES: 267 | .SUFFIXES: .cc .o .obj 268 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 269 | @for dep in $?; do \ 270 | case '$(am__configure_deps)' in \ 271 | *$$dep*) \ 272 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 273 | && { if test -f $@; then exit 0; else break; fi; }; \ 274 | exit 1;; \ 275 | esac; \ 276 | done; \ 277 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 278 | $(am__cd) $(top_srcdir) && \ 279 | $(AUTOMAKE) --foreign src/Makefile 280 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 281 | @case '$?' in \ 282 | *config.status*) \ 283 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 284 | *) \ 285 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 286 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 287 | esac; 288 | 289 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 290 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 291 | 292 | $(top_srcdir)/configure: $(am__configure_deps) 293 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 294 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 295 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 296 | $(am__aclocal_m4_deps): 297 | install-binPROGRAMS: $(bin_PROGRAMS) 298 | @$(NORMAL_INSTALL) 299 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 300 | if test -n "$$list"; then \ 301 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ 302 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ 303 | fi; \ 304 | for p in $$list; do echo "$$p $$p"; done | \ 305 | sed 's/$(EXEEXT)$$//' | \ 306 | while read p p1; do if test -f $$p \ 307 | ; then echo "$$p"; echo "$$p"; else :; fi; \ 308 | done | \ 309 | sed -e 'p;s,.*/,,;n;h' \ 310 | -e 's|.*|.|' \ 311 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 312 | sed 'N;N;N;s,\n, ,g' | \ 313 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 314 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 315 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 316 | else { print "f", $$3 "/" $$4, $$1; } } \ 317 | END { for (d in files) print "f", d, files[d] }' | \ 318 | while read type dir files; do \ 319 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 320 | test -z "$$files" || { \ 321 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 322 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 323 | } \ 324 | ; done 325 | 326 | uninstall-binPROGRAMS: 327 | @$(NORMAL_UNINSTALL) 328 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 329 | files=`for p in $$list; do echo "$$p"; done | \ 330 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 331 | -e 's/$$/$(EXEEXT)/' \ 332 | `; \ 333 | test -n "$$list" || exit 0; \ 334 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 335 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 336 | 337 | clean-binPROGRAMS: 338 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 339 | 340 | patchelf$(EXEEXT): $(patchelf_OBJECTS) $(patchelf_DEPENDENCIES) $(EXTRA_patchelf_DEPENDENCIES) 341 | @rm -f patchelf$(EXEEXT) 342 | $(AM_V_CXXLD)$(CXXLINK) $(patchelf_OBJECTS) $(patchelf_LDADD) $(LIBS) 343 | 344 | mostlyclean-compile: 345 | -rm -f *.$(OBJEXT) 346 | 347 | distclean-compile: 348 | -rm -f *.tab.c 349 | 350 | include ./$(DEPDIR)/patchelf.Po 351 | 352 | .cc.o: 353 | $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 354 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 355 | # $(AM_V_CXX)source='$<' object='$@' libtool=no \ 356 | # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ 357 | # $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< 358 | 359 | .cc.obj: 360 | $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 361 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 362 | # $(AM_V_CXX)source='$<' object='$@' libtool=no \ 363 | # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ 364 | # $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 365 | 366 | ID: $(am__tagged_files) 367 | $(am__define_uniq_tagged_files); mkid -fID $$unique 368 | tags: tags-am 369 | TAGS: tags 370 | 371 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 372 | set x; \ 373 | here=`pwd`; \ 374 | $(am__define_uniq_tagged_files); \ 375 | shift; \ 376 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 377 | test -n "$$unique" || unique=$$empty_fix; \ 378 | if test $$# -gt 0; then \ 379 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 380 | "$$@" $$unique; \ 381 | else \ 382 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 383 | $$unique; \ 384 | fi; \ 385 | fi 386 | ctags: ctags-am 387 | 388 | CTAGS: ctags 389 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 390 | $(am__define_uniq_tagged_files); \ 391 | test -z "$(CTAGS_ARGS)$$unique" \ 392 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 393 | $$unique 394 | 395 | GTAGS: 396 | here=`$(am__cd) $(top_builddir) && pwd` \ 397 | && $(am__cd) $(top_srcdir) \ 398 | && gtags -i $(GTAGS_ARGS) "$$here" 399 | cscopelist: cscopelist-am 400 | 401 | cscopelist-am: $(am__tagged_files) 402 | list='$(am__tagged_files)'; \ 403 | case "$(srcdir)" in \ 404 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 405 | *) sdir=$(subdir)/$(srcdir) ;; \ 406 | esac; \ 407 | for i in $$list; do \ 408 | if test -f "$$i"; then \ 409 | echo "$(subdir)/$$i"; \ 410 | else \ 411 | echo "$$sdir/$$i"; \ 412 | fi; \ 413 | done >> $(top_builddir)/cscope.files 414 | 415 | distclean-tags: 416 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 417 | 418 | distdir: $(DISTFILES) 419 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 420 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 421 | list='$(DISTFILES)'; \ 422 | dist_files=`for file in $$list; do echo $$file; done | \ 423 | sed -e "s|^$$srcdirstrip/||;t" \ 424 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 425 | case $$dist_files in \ 426 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 427 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 428 | sort -u` ;; \ 429 | esac; \ 430 | for file in $$dist_files; do \ 431 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 432 | if test -d $$d/$$file; then \ 433 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 434 | if test -d "$(distdir)/$$file"; then \ 435 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 436 | fi; \ 437 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 438 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 439 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 440 | fi; \ 441 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 442 | else \ 443 | test -f "$(distdir)/$$file" \ 444 | || cp -p $$d/$$file "$(distdir)/$$file" \ 445 | || exit 1; \ 446 | fi; \ 447 | done 448 | check-am: all-am 449 | check: check-am 450 | all-am: Makefile $(PROGRAMS) 451 | installdirs: 452 | for dir in "$(DESTDIR)$(bindir)"; do \ 453 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 454 | done 455 | install: install-am 456 | install-exec: install-exec-am 457 | install-data: install-data-am 458 | uninstall: uninstall-am 459 | 460 | install-am: all-am 461 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 462 | 463 | installcheck: installcheck-am 464 | install-strip: 465 | if test -z '$(STRIP)'; then \ 466 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 467 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 468 | install; \ 469 | else \ 470 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 471 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 472 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 473 | fi 474 | mostlyclean-generic: 475 | 476 | clean-generic: 477 | 478 | distclean-generic: 479 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 480 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 481 | 482 | maintainer-clean-generic: 483 | @echo "This command is intended for maintainers to use" 484 | @echo "it deletes files that may require special tools to rebuild." 485 | clean: clean-am 486 | 487 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 488 | 489 | distclean: distclean-am 490 | -rm -rf ./$(DEPDIR) 491 | -rm -f Makefile 492 | distclean-am: clean-am distclean-compile distclean-generic \ 493 | distclean-tags 494 | 495 | dvi: dvi-am 496 | 497 | dvi-am: 498 | 499 | html: html-am 500 | 501 | html-am: 502 | 503 | info: info-am 504 | 505 | info-am: 506 | 507 | install-data-am: 508 | 509 | install-dvi: install-dvi-am 510 | 511 | install-dvi-am: 512 | 513 | install-exec-am: install-binPROGRAMS 514 | 515 | install-html: install-html-am 516 | 517 | install-html-am: 518 | 519 | install-info: install-info-am 520 | 521 | install-info-am: 522 | 523 | install-man: 524 | 525 | install-pdf: install-pdf-am 526 | 527 | install-pdf-am: 528 | 529 | install-ps: install-ps-am 530 | 531 | install-ps-am: 532 | 533 | installcheck-am: 534 | 535 | maintainer-clean: maintainer-clean-am 536 | -rm -rf ./$(DEPDIR) 537 | -rm -f Makefile 538 | maintainer-clean-am: distclean-am maintainer-clean-generic 539 | 540 | mostlyclean: mostlyclean-am 541 | 542 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 543 | 544 | pdf: pdf-am 545 | 546 | pdf-am: 547 | 548 | ps: ps-am 549 | 550 | ps-am: 551 | 552 | uninstall-am: uninstall-binPROGRAMS 553 | 554 | .MAKE: install-am install-strip 555 | 556 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 557 | clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 558 | distclean distclean-compile distclean-generic distclean-tags \ 559 | distdir dvi dvi-am html html-am info info-am install \ 560 | install-am install-binPROGRAMS install-data install-data-am \ 561 | install-dvi install-dvi-am install-exec install-exec-am \ 562 | install-html install-html-am install-info install-info-am \ 563 | install-man install-pdf install-pdf-am install-ps \ 564 | install-ps-am install-strip installcheck installcheck-am \ 565 | installdirs maintainer-clean maintainer-clean-generic \ 566 | mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ 567 | ps ps-am tags tags-am uninstall uninstall-am \ 568 | uninstall-binPROGRAMS 569 | 570 | .PRECIOUS: Makefile 571 | 572 | 573 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 574 | # Otherwise a system limit (for SysV at least) may be exceeded. 575 | .NOEXPORT: 576 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CXXFLAGS = -Wall 2 | 3 | bin_PROGRAMS = patchelf 4 | 5 | patchelf_SOURCES = patchelf.cc elf.h 6 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.15 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/@PACKAGE@ 74 | pkgincludedir = $(includedir)/@PACKAGE@ 75 | pkglibdir = $(libdir)/@PACKAGE@ 76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | bin_PROGRAMS = patchelf$(EXEEXT) 90 | subdir = src 91 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 92 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 93 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 94 | $(ACLOCAL_M4) 95 | DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 96 | mkinstalldirs = $(install_sh) -d 97 | CONFIG_CLEAN_FILES = 98 | CONFIG_CLEAN_VPATH_FILES = 99 | am__installdirs = "$(DESTDIR)$(bindir)" 100 | PROGRAMS = $(bin_PROGRAMS) 101 | am_patchelf_OBJECTS = patchelf.$(OBJEXT) 102 | patchelf_OBJECTS = $(am_patchelf_OBJECTS) 103 | patchelf_LDADD = $(LDADD) 104 | AM_V_P = $(am__v_P_@AM_V@) 105 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 106 | am__v_P_0 = false 107 | am__v_P_1 = : 108 | AM_V_GEN = $(am__v_GEN_@AM_V@) 109 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 110 | am__v_GEN_0 = @echo " GEN " $@; 111 | am__v_GEN_1 = 112 | AM_V_at = $(am__v_at_@AM_V@) 113 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 114 | am__v_at_0 = @ 115 | am__v_at_1 = 116 | DEFAULT_INCLUDES = -I.@am__isrc@ 117 | depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp 118 | am__depfiles_maybe = depfiles 119 | am__mv = mv -f 120 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 121 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 122 | AM_V_CXX = $(am__v_CXX_@AM_V@) 123 | am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) 124 | am__v_CXX_0 = @echo " CXX " $@; 125 | am__v_CXX_1 = 126 | CXXLD = $(CXX) 127 | CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 128 | -o $@ 129 | AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 130 | am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) 131 | am__v_CXXLD_0 = @echo " CXXLD " $@; 132 | am__v_CXXLD_1 = 133 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 134 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 135 | AM_V_CC = $(am__v_CC_@AM_V@) 136 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) 137 | am__v_CC_0 = @echo " CC " $@; 138 | am__v_CC_1 = 139 | CCLD = $(CC) 140 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 141 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) 142 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 143 | am__v_CCLD_0 = @echo " CCLD " $@; 144 | am__v_CCLD_1 = 145 | SOURCES = $(patchelf_SOURCES) 146 | DIST_SOURCES = $(patchelf_SOURCES) 147 | am__can_run_installinfo = \ 148 | case $$AM_UPDATE_INFO_DIR in \ 149 | n|no|NO) false;; \ 150 | *) (install-info --version) >/dev/null 2>&1;; \ 151 | esac 152 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 153 | # Read a list of newline-separated strings from the standard input, 154 | # and print each of them once, without duplicates. Input order is 155 | # *not* preserved. 156 | am__uniquify_input = $(AWK) '\ 157 | BEGIN { nonempty = 0; } \ 158 | { items[$$0] = 1; nonempty = 1; } \ 159 | END { if (nonempty) { for (i in items) print i; }; } \ 160 | ' 161 | # Make sure the list of sources is unique. This is necessary because, 162 | # e.g., the same source file might be shared among _SOURCES variables 163 | # for different programs/libraries. 164 | am__define_uniq_tagged_files = \ 165 | list='$(am__tagged_files)'; \ 166 | unique=`for i in $$list; do \ 167 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 168 | done | $(am__uniquify_input)` 169 | ETAGS = etags 170 | CTAGS = ctags 171 | am__DIST_COMMON = $(srcdir)/Makefile.in \ 172 | $(top_srcdir)/build-aux/depcomp 173 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 174 | ACLOCAL = @ACLOCAL@ 175 | AMTAR = @AMTAR@ 176 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 177 | AUTOCONF = @AUTOCONF@ 178 | AUTOHEADER = @AUTOHEADER@ 179 | AUTOMAKE = @AUTOMAKE@ 180 | AWK = @AWK@ 181 | CC = @CC@ 182 | CCDEPMODE = @CCDEPMODE@ 183 | CFLAGS = @CFLAGS@ 184 | CPPFLAGS = @CPPFLAGS@ 185 | CXX = @CXX@ 186 | CXXDEPMODE = @CXXDEPMODE@ 187 | CXXFLAGS = @CXXFLAGS@ 188 | CYGPATH_W = @CYGPATH_W@ 189 | DEFS = @DEFS@ 190 | DEPDIR = @DEPDIR@ 191 | ECHO_C = @ECHO_C@ 192 | ECHO_N = @ECHO_N@ 193 | ECHO_T = @ECHO_T@ 194 | EXEEXT = @EXEEXT@ 195 | INSTALL = @INSTALL@ 196 | INSTALL_DATA = @INSTALL_DATA@ 197 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 198 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 199 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 200 | LDFLAGS = @LDFLAGS@ 201 | LIBOBJS = @LIBOBJS@ 202 | LIBS = @LIBS@ 203 | LTLIBOBJS = @LTLIBOBJS@ 204 | MAKEINFO = @MAKEINFO@ 205 | MKDIR_P = @MKDIR_P@ 206 | OBJEXT = @OBJEXT@ 207 | PACKAGE = @PACKAGE@ 208 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 209 | PACKAGE_NAME = @PACKAGE_NAME@ 210 | PACKAGE_STRING = @PACKAGE_STRING@ 211 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 212 | PACKAGE_URL = @PACKAGE_URL@ 213 | PACKAGE_VERSION = @PACKAGE_VERSION@ 214 | PATH_SEPARATOR = @PATH_SEPARATOR@ 215 | SET_MAKE = @SET_MAKE@ 216 | SHELL = @SHELL@ 217 | STRIP = @STRIP@ 218 | VERSION = @VERSION@ 219 | abs_builddir = @abs_builddir@ 220 | abs_srcdir = @abs_srcdir@ 221 | abs_top_builddir = @abs_top_builddir@ 222 | abs_top_srcdir = @abs_top_srcdir@ 223 | ac_ct_CC = @ac_ct_CC@ 224 | ac_ct_CXX = @ac_ct_CXX@ 225 | am__include = @am__include@ 226 | am__leading_dot = @am__leading_dot@ 227 | am__quote = @am__quote@ 228 | am__tar = @am__tar@ 229 | am__untar = @am__untar@ 230 | bindir = @bindir@ 231 | build_alias = @build_alias@ 232 | builddir = @builddir@ 233 | datadir = @datadir@ 234 | datarootdir = @datarootdir@ 235 | docdir = @docdir@ 236 | dvidir = @dvidir@ 237 | exec_prefix = @exec_prefix@ 238 | host_alias = @host_alias@ 239 | htmldir = @htmldir@ 240 | includedir = @includedir@ 241 | infodir = @infodir@ 242 | install_sh = @install_sh@ 243 | libdir = @libdir@ 244 | libexecdir = @libexecdir@ 245 | localedir = @localedir@ 246 | localstatedir = @localstatedir@ 247 | mandir = @mandir@ 248 | mkdir_p = @mkdir_p@ 249 | oldincludedir = @oldincludedir@ 250 | pdfdir = @pdfdir@ 251 | prefix = @prefix@ 252 | program_transform_name = @program_transform_name@ 253 | psdir = @psdir@ 254 | sbindir = @sbindir@ 255 | sharedstatedir = @sharedstatedir@ 256 | srcdir = @srcdir@ 257 | sysconfdir = @sysconfdir@ 258 | target_alias = @target_alias@ 259 | top_build_prefix = @top_build_prefix@ 260 | top_builddir = @top_builddir@ 261 | top_srcdir = @top_srcdir@ 262 | AM_CXXFLAGS = -Wall 263 | patchelf_SOURCES = patchelf.cc elf.h 264 | all: all-am 265 | 266 | .SUFFIXES: 267 | .SUFFIXES: .cc .o .obj 268 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 269 | @for dep in $?; do \ 270 | case '$(am__configure_deps)' in \ 271 | *$$dep*) \ 272 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 273 | && { if test -f $@; then exit 0; else break; fi; }; \ 274 | exit 1;; \ 275 | esac; \ 276 | done; \ 277 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 278 | $(am__cd) $(top_srcdir) && \ 279 | $(AUTOMAKE) --foreign src/Makefile 280 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 281 | @case '$?' in \ 282 | *config.status*) \ 283 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 284 | *) \ 285 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 286 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 287 | esac; 288 | 289 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 290 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 291 | 292 | $(top_srcdir)/configure: $(am__configure_deps) 293 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 294 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 295 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 296 | $(am__aclocal_m4_deps): 297 | install-binPROGRAMS: $(bin_PROGRAMS) 298 | @$(NORMAL_INSTALL) 299 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 300 | if test -n "$$list"; then \ 301 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ 302 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ 303 | fi; \ 304 | for p in $$list; do echo "$$p $$p"; done | \ 305 | sed 's/$(EXEEXT)$$//' | \ 306 | while read p p1; do if test -f $$p \ 307 | ; then echo "$$p"; echo "$$p"; else :; fi; \ 308 | done | \ 309 | sed -e 'p;s,.*/,,;n;h' \ 310 | -e 's|.*|.|' \ 311 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 312 | sed 'N;N;N;s,\n, ,g' | \ 313 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 314 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 315 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 316 | else { print "f", $$3 "/" $$4, $$1; } } \ 317 | END { for (d in files) print "f", d, files[d] }' | \ 318 | while read type dir files; do \ 319 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 320 | test -z "$$files" || { \ 321 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 322 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 323 | } \ 324 | ; done 325 | 326 | uninstall-binPROGRAMS: 327 | @$(NORMAL_UNINSTALL) 328 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 329 | files=`for p in $$list; do echo "$$p"; done | \ 330 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 331 | -e 's/$$/$(EXEEXT)/' \ 332 | `; \ 333 | test -n "$$list" || exit 0; \ 334 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 335 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 336 | 337 | clean-binPROGRAMS: 338 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 339 | 340 | patchelf$(EXEEXT): $(patchelf_OBJECTS) $(patchelf_DEPENDENCIES) $(EXTRA_patchelf_DEPENDENCIES) 341 | @rm -f patchelf$(EXEEXT) 342 | $(AM_V_CXXLD)$(CXXLINK) $(patchelf_OBJECTS) $(patchelf_LDADD) $(LIBS) 343 | 344 | mostlyclean-compile: 345 | -rm -f *.$(OBJEXT) 346 | 347 | distclean-compile: 348 | -rm -f *.tab.c 349 | 350 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patchelf.Po@am__quote@ 351 | 352 | .cc.o: 353 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 354 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 355 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 356 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 357 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< 358 | 359 | .cc.obj: 360 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 361 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 362 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 363 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 364 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 365 | 366 | ID: $(am__tagged_files) 367 | $(am__define_uniq_tagged_files); mkid -fID $$unique 368 | tags: tags-am 369 | TAGS: tags 370 | 371 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 372 | set x; \ 373 | here=`pwd`; \ 374 | $(am__define_uniq_tagged_files); \ 375 | shift; \ 376 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 377 | test -n "$$unique" || unique=$$empty_fix; \ 378 | if test $$# -gt 0; then \ 379 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 380 | "$$@" $$unique; \ 381 | else \ 382 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 383 | $$unique; \ 384 | fi; \ 385 | fi 386 | ctags: ctags-am 387 | 388 | CTAGS: ctags 389 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 390 | $(am__define_uniq_tagged_files); \ 391 | test -z "$(CTAGS_ARGS)$$unique" \ 392 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 393 | $$unique 394 | 395 | GTAGS: 396 | here=`$(am__cd) $(top_builddir) && pwd` \ 397 | && $(am__cd) $(top_srcdir) \ 398 | && gtags -i $(GTAGS_ARGS) "$$here" 399 | cscopelist: cscopelist-am 400 | 401 | cscopelist-am: $(am__tagged_files) 402 | list='$(am__tagged_files)'; \ 403 | case "$(srcdir)" in \ 404 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 405 | *) sdir=$(subdir)/$(srcdir) ;; \ 406 | esac; \ 407 | for i in $$list; do \ 408 | if test -f "$$i"; then \ 409 | echo "$(subdir)/$$i"; \ 410 | else \ 411 | echo "$$sdir/$$i"; \ 412 | fi; \ 413 | done >> $(top_builddir)/cscope.files 414 | 415 | distclean-tags: 416 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 417 | 418 | distdir: $(DISTFILES) 419 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 420 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 421 | list='$(DISTFILES)'; \ 422 | dist_files=`for file in $$list; do echo $$file; done | \ 423 | sed -e "s|^$$srcdirstrip/||;t" \ 424 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 425 | case $$dist_files in \ 426 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 427 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 428 | sort -u` ;; \ 429 | esac; \ 430 | for file in $$dist_files; do \ 431 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 432 | if test -d $$d/$$file; then \ 433 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 434 | if test -d "$(distdir)/$$file"; then \ 435 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 436 | fi; \ 437 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 438 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 439 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 440 | fi; \ 441 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 442 | else \ 443 | test -f "$(distdir)/$$file" \ 444 | || cp -p $$d/$$file "$(distdir)/$$file" \ 445 | || exit 1; \ 446 | fi; \ 447 | done 448 | check-am: all-am 449 | check: check-am 450 | all-am: Makefile $(PROGRAMS) 451 | installdirs: 452 | for dir in "$(DESTDIR)$(bindir)"; do \ 453 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 454 | done 455 | install: install-am 456 | install-exec: install-exec-am 457 | install-data: install-data-am 458 | uninstall: uninstall-am 459 | 460 | install-am: all-am 461 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 462 | 463 | installcheck: installcheck-am 464 | install-strip: 465 | if test -z '$(STRIP)'; then \ 466 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 467 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 468 | install; \ 469 | else \ 470 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 471 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 472 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 473 | fi 474 | mostlyclean-generic: 475 | 476 | clean-generic: 477 | 478 | distclean-generic: 479 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 480 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 481 | 482 | maintainer-clean-generic: 483 | @echo "This command is intended for maintainers to use" 484 | @echo "it deletes files that may require special tools to rebuild." 485 | clean: clean-am 486 | 487 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 488 | 489 | distclean: distclean-am 490 | -rm -rf ./$(DEPDIR) 491 | -rm -f Makefile 492 | distclean-am: clean-am distclean-compile distclean-generic \ 493 | distclean-tags 494 | 495 | dvi: dvi-am 496 | 497 | dvi-am: 498 | 499 | html: html-am 500 | 501 | html-am: 502 | 503 | info: info-am 504 | 505 | info-am: 506 | 507 | install-data-am: 508 | 509 | install-dvi: install-dvi-am 510 | 511 | install-dvi-am: 512 | 513 | install-exec-am: install-binPROGRAMS 514 | 515 | install-html: install-html-am 516 | 517 | install-html-am: 518 | 519 | install-info: install-info-am 520 | 521 | install-info-am: 522 | 523 | install-man: 524 | 525 | install-pdf: install-pdf-am 526 | 527 | install-pdf-am: 528 | 529 | install-ps: install-ps-am 530 | 531 | install-ps-am: 532 | 533 | installcheck-am: 534 | 535 | maintainer-clean: maintainer-clean-am 536 | -rm -rf ./$(DEPDIR) 537 | -rm -f Makefile 538 | maintainer-clean-am: distclean-am maintainer-clean-generic 539 | 540 | mostlyclean: mostlyclean-am 541 | 542 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 543 | 544 | pdf: pdf-am 545 | 546 | pdf-am: 547 | 548 | ps: ps-am 549 | 550 | ps-am: 551 | 552 | uninstall-am: uninstall-binPROGRAMS 553 | 554 | .MAKE: install-am install-strip 555 | 556 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 557 | clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 558 | distclean distclean-compile distclean-generic distclean-tags \ 559 | distdir dvi dvi-am html html-am info info-am install \ 560 | install-am install-binPROGRAMS install-data install-data-am \ 561 | install-dvi install-dvi-am install-exec install-exec-am \ 562 | install-html install-html-am install-info install-info-am \ 563 | install-man install-pdf install-pdf-am install-ps \ 564 | install-ps-am install-strip installcheck installcheck-am \ 565 | installdirs maintainer-clean maintainer-clean-generic \ 566 | mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ 567 | ps ps-am tags tags-am uninstall uninstall-am \ 568 | uninstall-binPROGRAMS 569 | 570 | .PRECIOUS: Makefile 571 | 572 | 573 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 574 | # Otherwise a system limit (for SysV at least) may be exceeded. 575 | .NOEXPORT: 576 | -------------------------------------------------------------------------------- /tests/.deps/bar.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/big-dynstr.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/foo.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/main.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/no_rpath-no-rpath.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/simple-simple.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/.deps/simple.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | LIBS = 2 | 3 | check_PROGRAMS = simple main main-scoped big-dynstr no-rpath 4 | 5 | no_rpath_arch_TESTS = \ 6 | no-rpath-amd64.sh \ 7 | no-rpath-armel.sh \ 8 | no-rpath-armhf.sh \ 9 | no-rpath-hurd-i386.sh \ 10 | no-rpath-i386.sh \ 11 | no-rpath-ia64.sh \ 12 | no-rpath-kfreebsd-amd64.sh \ 13 | no-rpath-kfreebsd-i386.sh \ 14 | no-rpath-mips.sh \ 15 | no-rpath-mipsel.sh \ 16 | no-rpath-powerpc.sh \ 17 | no-rpath-s390.sh \ 18 | no-rpath-sh4.sh \ 19 | no-rpath-sparc.sh 20 | 21 | src_TESTS = \ 22 | plain-fail.sh plain-run.sh shrink-rpath.sh set-interpreter-short.sh \ 23 | set-interpreter-long.sh set-rpath.sh no-rpath.sh big-dynstr.sh \ 24 | set-rpath-library.sh soname.sh 25 | 26 | build_TESTS = \ 27 | $(no_rpath_arch_TESTS) 28 | 29 | TESTS = $(src_TESTS) $(build_TESTS) 30 | 31 | EXTRA_DIST = no-rpath-prebuild $(src_TESTS) no-rpath-prebuild.sh 32 | 33 | TESTS_ENVIRONMENT = PATCHELF_DEBUG=1 34 | 35 | $(no_rpath_arch_TESTS): no-rpath-prebuild.sh 36 | @ln -s $< $@ 37 | 38 | CLEANFILES = big-dynstr.c 39 | clean-local: 40 | $(RM) -r scratch $(no_rpath_arch_TESTS) 41 | 42 | # by default, use -fpic to compile 43 | AM_CFLAGS = -fpic 44 | LDFLAGS_local = -Wl,--disable-new-dtags -Wl,-rpath-link=. -L. $(AM_LDFLAGS) 45 | LDFLAGS_sharedlib = -Wl,--disable-new-dtags -shared -L. $(AM_LDFLAGS) 46 | export NIX_DONT_SET_RPATH=1 47 | export NIX_LDFLAGS= 48 | 49 | simple_SOURCES = simple.c 50 | # no -fpic for simple.o 51 | simple_CFLAGS = 52 | 53 | main_SOURCES = main.c 54 | main_LDADD = -lfoo $(AM_LDADD) 55 | main_DEPENDENCIES = libfoo.so 56 | main_LDFLAGS = $(LDFLAGS_local) 57 | 58 | main_scoped_SOURCES = main.c 59 | main_scoped_LDADD = -lfoo-scoped $(AM_LDADD) 60 | main_scoped_DEPENDENCIES = libfoo-scoped.so 61 | main_scoped_LDFLAGS = $(LDFLAGS_local) 62 | 63 | big-dynstr.c: main.c 64 | cat $< > big-dynstr.c 65 | for i in $$(seq 1 2000); do echo "void f$$i(void) { };" >> big-dynstr.c; done 66 | 67 | nodist_big_dynstr_SOURCES = big-dynstr.c 68 | big_dynstr_LDADD = -lfoo $(AM_LDADD) 69 | big_dynstr_DEPENDENCIES = libfoo.so 70 | big_dynstr_LDFLAGS = $(LDFLAGS_local) 71 | 72 | # declare local shared libraries as programs as: 73 | # - without libtool, only archives (static libraries) can be built by automake 74 | # - with libtool, it is difficult to control options 75 | # - with libtool, it is not possible to compile convenience *dynamic* libraries :-( 76 | check_PROGRAMS += libfoo.so libfoo-scoped.so libbar.so libbar-scoped.so libsimple.so 77 | 78 | libfoo_so_SOURCES = foo.c 79 | libfoo_so_LDADD = -lbar $(AM_LDADD) 80 | libfoo_so_DEPENDENCIES = libbar.so 81 | libfoo_so_LDFLAGS = $(LDFLAGS_sharedlib) 82 | 83 | libfoo_scoped_so_SOURCES = foo.c 84 | libfoo_scoped_so_LDADD = -lbar-scoped $(AM_LDADD) 85 | libfoo_scoped_so_DEPENDENCIES = libbar-scoped.so 86 | libfoo_scoped_so_LDFLAGS = $(LDFLAGS_sharedlib) 87 | 88 | libbar_so_SOURCES = bar.c 89 | libbar_so_LDFLAGS = $(LDFLAGS_sharedlib) -Wl,-rpath,`pwd`/no-such-path 90 | 91 | libbar_scoped_so_SOURCES = bar.c 92 | libbar_scoped_so_LDFLAGS = $(LDFLAGS_sharedlib) 93 | 94 | libsimple_so_SOURCES = simple.c 95 | libsimple_so_LDFLAGS = $(LDFLAGS_sharedlib) 96 | 97 | no_rpath_SOURCES = no-rpath.c 98 | # no -fpic for no-rpath.o 99 | no_rpath_CFLAGS = 100 | -------------------------------------------------------------------------------- /tests/bar.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int bar() 4 | { 5 | printf("This is bar()!\n"); 6 | return 34; 7 | } 8 | -------------------------------------------------------------------------------- /tests/big-dynstr.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | rm -rf ${SCRATCH} 5 | mkdir -p ${SCRATCH} 6 | mkdir -p ${SCRATCH}/libsA 7 | mkdir -p ${SCRATCH}/libsB 8 | 9 | cp big-dynstr ${SCRATCH}/ 10 | cp libfoo.so ${SCRATCH}/libsA/ 11 | cp libbar.so ${SCRATCH}/libsB/ 12 | 13 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/big-dynstr) 14 | if test -z "$oldRPath"; then oldRPath="/oops"; fi 15 | ../src/patchelf --force-rpath --set-rpath $oldRPath:$(pwd)/${SCRATCH}/libsA:$(pwd)/${SCRATCH}/libsB ${SCRATCH}/big-dynstr 16 | 17 | if test "$(uname)" = FreeBSD; then 18 | export LD_LIBRARY_PATH=$(pwd)/${SCRATCH}/libsB 19 | fi 20 | 21 | exitCode=0 22 | cd ${SCRATCH} && ./big-dynstr || exitCode=$? 23 | 24 | if test "$exitCode" != 46; then 25 | echo "bad exit code!" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /tests/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* Include a bogus .interp section in libfoo.so (NIXPKGS-98). 4 | Borrowed from Glibc. */ 5 | const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) = "/foo/bar"; 6 | 7 | int bar(); 8 | 9 | int foo() 10 | { 11 | printf("This is foo()!\n"); 12 | return 12 + bar(); 13 | } 14 | -------------------------------------------------------------------------------- /tests/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char buf[16 * 1024 * 1024]; 4 | 5 | int foo(); 6 | 7 | int main(int argc, char * * argv) 8 | { 9 | int x; 10 | printf("Hello World\n"); 11 | x = foo(); 12 | printf("Result is %d\n", x); 13 | return x; 14 | } 15 | -------------------------------------------------------------------------------- /tests/no-rpath-prebuild.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | set -x 3 | ARCH="$1" 4 | 5 | if [ -z "$ARCH" ]; then 6 | ARCH=$(basename $0 .sh | sed -e 's/.*-//') 7 | fi 8 | 9 | SCRATCH=scratch/no-rpath-$ARCH 10 | 11 | if [ -z "$ARCH" ] || [ $ARCH = prebuild ] ; then 12 | echo "Architecture required" 13 | exit 1 14 | fi 15 | 16 | no_rpath_bin="${srcdir}/no-rpath-prebuild/no-rpath-$ARCH" 17 | 18 | if [ ! -f $no_rpath_bin ]; then 19 | echo "no 'no-rpath' binary for '$ARCH' in '${srcdir}/no-rpath-prebuild'" 20 | exit 1 21 | fi 22 | 23 | rm -rf ${SCRATCH} 24 | mkdir -p ${SCRATCH} 25 | 26 | cp $no_rpath_bin ${SCRATCH}/no-rpath 27 | 28 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath) 29 | if test -n "$oldRPath"; then exit 1; fi 30 | ../src/patchelf \ 31 | --set-interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \ 32 | --set-rpath /foo:/bar:/xxxxxxxxxxxxxxx ${SCRATCH}/no-rpath 33 | 34 | newRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath) 35 | if ! echo "$newRPath" | grep -q '/foo:/bar'; then 36 | echo "incomplete RPATH" 37 | exit 1 38 | fi 39 | -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-amd64 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-armel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-armel -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-armhf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-armhf -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-hurd-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-hurd-i386 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-i386 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-ia64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-ia64 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-kfreebsd-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-kfreebsd-amd64 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-kfreebsd-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-kfreebsd-i386 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-mips -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-mipsel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-mipsel -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-powerpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-powerpc -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-s390: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-s390 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-sh4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-sh4 -------------------------------------------------------------------------------- /tests/no-rpath-prebuild/no-rpath-sparc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-on-android/patchelf/5a015dafc8710c3cb3475206601d1cdd4cc52f36/tests/no-rpath-prebuild/no-rpath-sparc -------------------------------------------------------------------------------- /tests/no-rpath.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | printf("Hello world\n"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /tests/no-rpath.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | rm -rf ${SCRATCH} 5 | mkdir -p ${SCRATCH} 6 | 7 | cp no-rpath ${SCRATCH}/ 8 | 9 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath) 10 | if test -n "$oldRPath"; then exit 1; fi 11 | ../src/patchelf \ 12 | --set-interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \ 13 | --set-rpath /foo:/bar:/xxxxxxxxxxxxxxx ${SCRATCH}/no-rpath 14 | 15 | newRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath) 16 | if ! echo "$newRPath" | grep -q '/foo:/bar'; then 17 | echo "incomplete RPATH" 18 | exit 1 19 | fi 20 | 21 | cd ${SCRATCH} && ./no-rpath 22 | -------------------------------------------------------------------------------- /tests/plain-fail.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | if ./main; then 3 | exit 1 4 | fi 5 | -------------------------------------------------------------------------------- /tests/plain-run.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | LD_LIBRARY_PATH=. ./main 3 | exitCode=$? 4 | if test "$exitCode" != 46; then 5 | echo "bad exit code!" 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /tests/set-interpreter-long.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | ./simple 5 | 6 | oldInterpreter=$(../src/patchelf --print-interpreter ./simple) 7 | echo "current interpreter is $oldInterpreter" 8 | 9 | if test "$(uname)" = Linux; then 10 | echo "running with explicit interpreter..." 11 | "$oldInterpreter" ./simple 12 | fi 13 | 14 | rm -rf ${SCRATCH} 15 | mkdir -p ${SCRATCH} 16 | 17 | newInterpreter=$(pwd)/${SCRATCH}/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 18 | cp simple ${SCRATCH}/ 19 | ../src/patchelf --set-interpreter "$newInterpreter" ${SCRATCH}/simple 20 | 21 | echo "running with missing interpreter..." 22 | if ${SCRATCH}/simple; then 23 | echo "simple works, but it shouldn't" 24 | exit 1 25 | fi 26 | 27 | echo "running with new interpreter..." 28 | ln -s "$oldInterpreter" "$newInterpreter" 29 | ${SCRATCH}/simple 30 | 31 | if test "$(uname)" = Linux; then 32 | echo "running with explicit interpreter..." 33 | "$oldInterpreter" ${SCRATCH}/simple 34 | fi 35 | -------------------------------------------------------------------------------- /tests/set-interpreter-short.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | ./simple 5 | 6 | oldInterpreter=$(../src/patchelf --print-interpreter ./simple) 7 | echo "current interpreter is $oldInterpreter" 8 | 9 | rm -rf ${SCRATCH} 10 | mkdir -p ${SCRATCH} 11 | 12 | cp simple ${SCRATCH}/ 13 | ../src/patchelf --set-interpreter /oops ${SCRATCH}/simple 14 | 15 | echo "running with missing interpreter..." 16 | if ${SCRATCH}/simple; then 17 | echo "simple works, but it shouldn't" 18 | exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /tests/set-rpath-library.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | if test "$(uname)" = FreeBSD; then 5 | echo "skipping on FreeBSD" 6 | exit 0 7 | fi 8 | 9 | rm -rf ${SCRATCH} 10 | mkdir -p ${SCRATCH} 11 | mkdir -p ${SCRATCH}/libsA 12 | mkdir -p ${SCRATCH}/libsB 13 | 14 | cp main-scoped ${SCRATCH}/ 15 | cp libfoo-scoped.so ${SCRATCH}/libsA/ 16 | cp libbar-scoped.so ${SCRATCH}/libsB/ 17 | 18 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/main-scoped) 19 | if test -z "$oldRPath"; then oldRPath="/oops"; fi 20 | ../src/patchelf --set-rpath $oldRPath:$(pwd)/${SCRATCH}/libsA:$(pwd)/${SCRATCH}/libsB ${SCRATCH}/main-scoped 21 | 22 | # "main" contains libbar in its RUNPATH, but that's ignored when 23 | # resolving libfoo. So libfoo won't find libbar and this will fail. 24 | exitCode=0 25 | (cd ${SCRATCH} && ./main-scoped) || exitCode=$? 26 | 27 | if test "$exitCode" = 46; then 28 | echo "expected failure" 29 | exit 1 30 | fi 31 | 32 | # So set an RUNPATH on libfoo as well. 33 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/libsA/libfoo-scoped.so) 34 | if test -z "$oldRPath"; then oldRPath="/oops"; fi 35 | ../src/patchelf --set-rpath $oldRPath:$(pwd)/${SCRATCH}/libsB ${SCRATCH}/libsA/libfoo-scoped.so 36 | 37 | exitCode=0 38 | (cd ${SCRATCH} && ./main-scoped) || exitCode=$? 39 | 40 | if test "$exitCode" != 46; then 41 | echo "bad exit code!" 42 | exit 1 43 | fi 44 | 45 | # Remove the libbar PATH from main using --shrink-rpath. 46 | ../src/patchelf --shrink-rpath ${SCRATCH}/main-scoped 47 | if ../src/patchelf --print-rpath ${SCRATCH}/main-scoped | grep /libsB; then 48 | echo "shrink failed" 49 | exit 1 50 | fi 51 | 52 | # And it should still run. 53 | exitCode=0 54 | (cd ${SCRATCH} && ./main-scoped) || exitCode=$? 55 | 56 | if test "$exitCode" != 46; then 57 | echo "bad exit code!" 58 | exit 1 59 | fi 60 | -------------------------------------------------------------------------------- /tests/set-rpath.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | rm -rf ${SCRATCH} 5 | mkdir -p ${SCRATCH} 6 | mkdir -p ${SCRATCH}/libsA 7 | mkdir -p ${SCRATCH}/libsB 8 | 9 | cp main ${SCRATCH}/ 10 | cp libfoo.so ${SCRATCH}/libsA/ 11 | cp libbar.so ${SCRATCH}/libsB/ 12 | 13 | oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/main) 14 | if test -z "$oldRPath"; then oldRPath="/oops"; fi 15 | ../src/patchelf --force-rpath --set-rpath $oldRPath:$(pwd)/${SCRATCH}/libsA:$(pwd)/${SCRATCH}/libsB ${SCRATCH}/main 16 | 17 | if test "$(uname)" = FreeBSD; then 18 | export LD_LIBRARY_PATH=$(pwd)/${SCRATCH}/libsB 19 | fi 20 | 21 | exitCode=0 22 | (cd ${SCRATCH} && ./main) || exitCode=$? 23 | 24 | if test "$exitCode" != 46; then 25 | echo "bad exit code!" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /tests/shrink-rpath.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | rpath=$(../src/patchelf --print-rpath ./libbar.so) 5 | echo "RPATH before: $rpath" 6 | if ! echo "$rpath" | grep -q /no-such-path; then 7 | echo "incomplete RPATH" 8 | exit 1 9 | fi 10 | 11 | rm -rf ${SCRATCH} 12 | mkdir -p ${SCRATCH} 13 | cp libbar.so ${SCRATCH}/ 14 | ../src/patchelf --shrink-rpath ${SCRATCH}/libbar.so 15 | 16 | rpath=$(../src/patchelf --print-rpath ${SCRATCH}/libbar.so) 17 | echo "RPATH after: $rpath" 18 | if echo "$rpath" | grep -q /no-such-path; then 19 | echo "RPATH not shrunk" 20 | exit 1 21 | fi 22 | 23 | cp libfoo.so ${SCRATCH}/ 24 | 25 | exitCode=0 26 | cd ${SCRATCH} && LD_LIBRARY_PATH=. ../../main || exitCode=$? 27 | 28 | if test "$exitCode" != 46; then 29 | echo "bad exit code!" 30 | exit 1 31 | fi 32 | -------------------------------------------------------------------------------- /tests/simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char buf[16 * 1024 * 1024]; 4 | 5 | int main(int argc, char * * argv) 6 | { 7 | printf("Hello World\n"); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /tests/soname.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | SCRATCH=scratch/$(basename $0 .sh) 3 | 4 | rm -rf ${SCRATCH} 5 | mkdir -p ${SCRATCH} 6 | 7 | cp libsimple.so ${SCRATCH}/ 8 | 9 | # set an initial DT_SONAME entry 10 | ../src/patchelf --set-soname libsimple.so.1.0 ${SCRATCH}/libsimple.so 11 | newSoname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so) 12 | if test "$newSoname" != libsimple.so.1.0; then 13 | echo "failed --set-soname test. Expected newSoname: libsimple.so.1.0, got: $newSoname" 14 | exit 1 15 | fi 16 | 17 | # print DT_SONAME 18 | soname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so) 19 | if test "$soname" != libsimple.so.1.0; then 20 | echo "failed --print-soname test. Expected soname: libsimple.so.1.0, got: $soname" 21 | exit 1 22 | fi 23 | 24 | # replace DT_SONAME entry 25 | ../src/patchelf --set-soname libsimple.so.1.1 ${SCRATCH}/libsimple.so 26 | newSoname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so) 27 | if test "$newSoname" != libsimple.so.1.1; then 28 | echo "failed --set-soname test. Expected newSoname: libsimple.so.1.1, got: $newSoname" 29 | exit 1 30 | fi 31 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 0.9 2 | --------------------------------------------------------------------------------