| Summary: | Relocate segments in native binaries when restoring from sstate | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> |
| Component: | core | Assignee: | Unassigned <unassigned> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | jku, juro.bystricky, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie |
| Version: | 2.0 | ||
| Target Milestone: | Future | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
| Bug Depends on: | |||
| Bug Blocks: | 9883 | ||
|
Description
Ross Burton
2016-03-11 14:31:13 UTC
similar problem with hard-coded paths in glibc: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8583 A list of recipes which could do with this: - glib GIO module path - curl ca-certificate path - libxml2 catalog path (In reply to comment #2) > A list of recipes which could do with this: > - glib GIO module path > - curl ca-certificate path > - libxml2 catalog path Thanks. I'll have a go at this (self-assigning for now ). I had a look yesterday and below is my understanding of the tasks (do correct if I'm mistaken). 1. Add magic attribute to path variables in native binaries where needed I guess this means patches like the glibc one: + static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH; 2. Store the original sysroot path somewhere when populating the sysroot I don't see (good) ways around this: in the SDK relocation case it's done when the SDK is generated: ##DEFAULT_INSTALL_DIR## is replaced in the relocation script itself. Not sure how this should be done... 3. During recipe sysroot preparation modify binaries to replace original path with current sysroot path (like relocate_sdk.py) This should be straight forward once #2 is solved -- but would be good to not copy-paste half of relocate_sdk.py somewhere else... After a bit of testing I have questions: * the binaries in recipe-sysroot-native are hardlinks (with copies in other recipe-sysroot-natives, sysroot-components and the original sysroot-destdir). I'm not sure what I should be doing with that -- I think the the value of e.g. CURL_CA_BUNDLE should be different for every recipe-sysroot-native dir, or is there some alternative that I've overlooked? * Assuming I figure that out, where exactly should the binary-relocation happen? staging.bbclass::extend_recipe_sysroot() is ... scary. 1) Maybe unhardlink any files that get modified. There won't be that many. 2) Talk to RP. Yes, it is. :) |