Re: [PATCH] Replace __toc_start + 0x8000 with .TOC.

2021-03-06 Thread Fāng-ruì Sòng
On Sat, Mar 6, 2021 at 10:25 PM Segher Boessenkool wrote: > > Hi! > > On Sat, Mar 06, 2021 at 09:14:33PM -0800, Fangrui Song wrote: > > TOC relocations are like GOT relocations on other architectures. > > However, unlike other architectures, GNU ld's ppc64 port defines .TOC. > > relative to the

Re: [PATCH] Replace __toc_start + 0x8000 with .TOC.

2021-03-06 Thread Segher Boessenkool
Hi! On Sat, Mar 06, 2021 at 09:14:33PM -0800, Fangrui Song wrote: > TOC relocations are like GOT relocations on other architectures. > However, unlike other architectures, GNU ld's ppc64 port defines .TOC. > relative to the .got output section instead of the linker synthesized > .got input

[PATCH] Replace __toc_start + 0x8000 with .TOC.

2021-03-06 Thread Fangrui Song
TOC relocations are like GOT relocations on other architectures. However, unlike other architectures, GNU ld's ppc64 port defines .TOC. relative to the .got output section instead of the linker synthesized .got input section. LLD defines .TOC. as the .got input section plus 0x8000. When