On Fri, Jan 1, 2021 at 7:49 AM xie cui <cuiwei...@gmail.com> wrote: > > in my mind, the main job of linker is to resolve symbols between .a files, is > the right? > my question: > there a func named foo def in a.a, and there a func named bar in b.a, > bar will call foo, > before link the two file, i think in bar 's code has a instruction like: > call foo, in C, before link the instruction is call 0x0, what's in .a file of > go? > the linker will change call 0x0 or something like call foo, to call > 0xaaa(assume that 0xaaa is address of foo after linker), so where can i find > the code resolve symbols to real address in source code of linker?
You may find it helpful to read my old series of blog posts about how linkers work. Start at https://www.airs.com/blog/archives/38. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWz%2BogsFUEvzzEObAzAKxit-1ZcN7uYr93LegKjJKrtuw%40mail.gmail.com.