Don't indirect our own BSS accessor functions.
delocate.go was adding redirector functions for the “_bss_get” functions. (And they were going via the PLT too.) Change-Id: I86bc9f0516a128a769068182cc280499f89b6c29 Reviewed-on: https://boringssl-review.googlesource.com/15148 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
e2a701ea1e
commit
1bd689d1fc
@ -184,6 +184,13 @@ func transform(lines []string, symbols map[string]bool) (ret []string) {
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.HasSuffix(target, "_bss_get@PLT") || strings.HasSuffix(target, "_bss_get") {
|
||||
// reference to a synthesised function. Don't
|
||||
// indirect ourselves and drop PLT indirection.
|
||||
ret = append(ret, strings.Replace(line, "@PLT", "", 1))
|
||||
continue
|
||||
}
|
||||
|
||||
if isGlobal, ok := symbols[target]; ok {
|
||||
newTarget := target
|
||||
if isGlobal {
|
||||
@ -264,7 +271,6 @@ func transform(lines []string, symbols map[string]bool) (ret []string) {
|
||||
p := strings.Split(parts[1], ",")
|
||||
name := p[0]
|
||||
bssAccessorsNeeded = append(bssAccessorsNeeded, name)
|
||||
symbols[accessorName(name)] = false
|
||||
ret = append(ret, line)
|
||||
|
||||
case ".section":
|
||||
|
Loading…
Reference in New Issue
Block a user