Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

How to make ld (linker) to create new dynamic tags in ELF without flag "--enable-new-dtags".

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to make ld (linker) to create new dynamic tags in ELF without flag "--enable-new-dtags".
Just compiled binutils-2.30 makes old tags by default.
Test program:

$ echo "int main(void) { return 0; }" > conftest.c
$ gcc -o conftestexe -g -O2 -Wl,-rpath -Wl,/foo conftest.c
$ objdump -p conftestexe | grep foo
#for big program better:
$ readelf -d conftestexe | grep PATH

it's for new by default: RUNPATH /foo
it's for old by default: RPATH /foo

Hardcoded (forced/sticked) RUNPATH is used for auto-testing,
for example MPFR's "configure" changes behavior because of it
(lt_cv_shlibpath_overrides_runpath=no for old RPATH)
 
Good night. Drive safely. Here's a tiny ad for the road:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!