Commit 2deda879 authored by Clément Chigot's avatar Clément Chigot Committed by Ian Lance Taylor

cmd/link: improve XCOFF symbol table

This commit improves symbol table for XCOFF format.
It adds symbol alignment, TLS symbols and move the whole symbol table at
the end of the FILE. As relocations in the future external linking will
need symbols' index, we cannot write the symbol table when it's
generated.

Change-Id: I5dcae85b95e538b65f1a128faf56d4e2aa15baf1
Reviewed-on: https://go-review.googlesource.com/c/163998
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent e32203f6
...@@ -994,6 +994,7 @@ func symalign(s *sym.Symbol) int32 { ...@@ -994,6 +994,7 @@ func symalign(s *sym.Symbol) int32 {
for int64(align) > s.Size && align > min { for int64(align) > s.Size && align > min {
align >>= 1 align >>= 1
} }
s.Align = align
return align return align
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment