TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Relocatable linking

52 pointsby MaskRayover 2 years ago

2 comments

vaughanover 2 years ago
I wish there was a GUI&#x2F;visualization for all this.<p>Everything is relatively simple to understand when visualized like it would be on a lecture slide. But reading about it in manpages and blog articles is overwhelming.
评论 #33735172 未加载
JonChesterfieldover 2 years ago
I thought kernel modules were elf files created by relocatable links but that seems a strange omission from the examples list if so, may be misremembering.<p>ld -r elf -o out should be a no-op on well formed input. It means create a file that will be passed to another linker invocation later. So it&#x27;s a means of composing together N object files to get one file that you can use in place of those N. A little like a library.<p>I structured builds like that for a while. Source foo.c to foo.o, directory bar to bar.o containing whatever was in that directory relocatably-linked together, possibly internalising symbols as it goes.