I
Ian Wienand
technovelty.org · Personal blog · on HN since 2007
Ian Wienand writes about Linux internals, dynamic linking, x86 performance, and build and CI tooling such as OpenStack's Zuul and Ansible.
What HN saysHN commenters engage with his technical posts on dynamic libraries and position-independent code, adding their own notes on performance trade-offs and build practices.
16HN people shared it
3linked it in comments
16stories submitted
135story points
5 years agolast shared
2007people per year2026
Most-shared posts
- 1PLT and GOT – the key to code sharing and dynamic libraries (2011)3 people · 4 points · first shared 2014 · discussion on HN
- 2Position Independent Code and x86-64 libraries3 people · 3 points · first shared 2013 · discussion on HN
- 3The quickest way to do nothing2 people · 2 points · first shared 2011 · discussion on HN
- 4What actually happens when you plug in a USB device? (2007)1 people · 92 points · first shared 2014 · 19 comments on HN
- 5Playing with the x86 PMU1 people · 19 points · first shared 2010 · discussion on HN
- 6VMware and GPL – it's about api boundaries, not copy-paste1 people · 7 points · first shared 2015 · 2 comments on HN
- 7Why symbol visibility is good1 people · 2 points · first shared 2022 · discussion on HN
- 8Zuul and Ansible in OpenStack CI1 people · 2 points · first shared 2016 · discussion on HN
- 9What actually happens when you plug in a USB device?1 people · 1 points · first shared 2007 · discussion on HN
- 10Exploring $ORIGIN in RPATH (2011)1 people · 1 points · first shared 2013 · discussion on HN
- 11Image building for OpenStack CI – Minimal images, big effort1 people · 1 points · first shared 2016 · discussion on HN
- 12The Quickest Way to Do Nothing1 people · 1 points · first shared 2013 · discussion on HN
- 13The stamp idiom with make1 people · first shared 2018
- 14Debug info1 people · first shared 2012
What HN people wrote when they linked it
ganonm · 2018-01-11
You may want to consider using 'stamp files'. These are just empty files created via 'touch' to serve as a timestamp that Make can use to determine if a target needs to be rebuilt if the target doesn't correspond to an actual file in the build directory. This is useful for build targets such as running docker-compose build.
See https://www.technovelty.org/tips/the-stamp-idiom-with-make.html
leni536 · 2018-01-04
It has an interesting performance impact on calls to dynamic libraries. One alternative approach would be to avoid the indirect calls through not using '-fPIC --shared' when building shared libraries but '-mcmodel=large --shared'. This causes the relocations to happen at the direct calls and not through a GOT.
The obvious drawback that it effectively disables sharing code in memory, it would still allow sharing code on disk though. So it would be a middle ground between the current state in dynamic and static linking.
https://www.technovelty.org/c/position-independent-code-and-x86-64-lib…
AceJohnny2 · 2012-01-16
While not as straightforward as on Windows (which isn't developer oriented), it's possible on Linux and standard on most distributions (just look at all the -dbg packages of debian-based distributions). A little googling found these instructions involving objcopy to separate debug symbols:
http://www.technovelty.org/code/debug-info.html