Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for a custom built dynamic loader #866

Merged
merged 6 commits into from Jul 16, 2014

Conversation

davidlt
Copy link
Contributor

@davidlt davidlt commented Jul 16, 2014

  • Add PatchELF utility for patching ELF binaries in post-install
    step.
  • Do ELF relocation for bin/$SCRAM_ARCH and test/$SCRAM_ARCH using
    CMS_INSTALL_PREFIX.
  • Relocation is only done for slc6_amd64_* (current production
    architecture for CMSSW_7_2_X).

This makes IB/CMSSW_7_2_X/stable and IB/CMSSW_7_2_X/next identical.

Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch

- Add PatchELF utility for patching ELF binaries in post-install
  step.
- Do ELF relocation for bin/$SCRAM_ARCH and test/$SCRAM_ARCH using
  CMS_INSTALL_PREFIX.
- Relocation is only done for slc6_amd64_* (current production
  architecture for CMSSW_7_2_X).

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
@ktf
Copy link
Contributor

ktf commented Jul 16, 2014

This will not work on mac. Can you please add the relevant checks?

@smuzaffar
Copy link
Contributor

@davidlt , can you put all the new
Requires: xxx

in %islinux?

@smuzaffar
Copy link
Contributor

also please fix these:

  • you do not need LDFLAGS in gcc-ccompiler.xml. Having it in gcc-cxxcompiler is enough.
  • In cmssw-tool-conf.spec we have multiple Requires: glibc-toolfile (one within %islinux and one outside)

David Abdurachmanov added 2 commits July 16, 2014 15:21
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
@davidlt
Copy link
Contributor Author

davidlt commented Jul 16, 2014

Updated. That should do it.

@smuzaffar
Copy link
Contributor

Looks much better now. Just a minor fix

  • cmssw-tool-conf.spec: glibc-toolfile dependency is mentioned twice. Please clean it up and may be put it in %islinux %isamd64 (just to make it consistent with rest of the changes)

By the way what will happen if changeDynLoader is not set for a project? gcc-toolfile will set LDFLAGS=-Wl,-dynamic-linker,@GLIBC_ROOT@/lib64/ld.so , so if changeDynLoader is not set this mean there will be no relocation at install time .... right?

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
@davidlt
Copy link
Contributor Author

davidlt commented Jul 16, 2014

Must be blind. Cleaned cmssw-tool-conf.spec.

You are correct changeDynLoader activates post-install relocation for SCRAM based project. We could replace changeDynLoader with some file in CMSDIST. We could read the content of this file (yes/no) in cmssw-tool-conf.spec, gcc-toolfile.spec, cmssw.spec and maybe coral.spec. This would complete allow to control it ON/OFF across multiple SPECs.

David Abdurachmanov added 2 commits July 16, 2014 16:43
- BuildFile must add LDFLAGS rule for a custom dynamic loader
- We only relocate ELF binaries, which were built with a dynamic
  loader from CMSDIST

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
- Drop hard dependency on glibc in gcc-toolfile.spec
- Remove a switch allowing to control post-install relocation.
  Everything is now done based on .interp section content.
  If ELF binary has .interp with $SCRAM_ARCH/external/glibc in
  path we then do post-install relocation on it.

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
ktf added a commit that referenced this pull request Jul 16, 2014
Add support for a custom built dynamic loader.
@ktf ktf merged commit fa9e81b into cms-sw:IB/CMSSW_7_2_X/stable Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants