[PATCH] D61610: [PPC64] implement Thunk Section Spacing

Alfredo Dal'Ava JĂșnior via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 10:18:31 PDT 2019


adalava added inline comments.


================
Comment at: lld/test/ELF/ppc64-branch-thunkspacing.s:18
+        mr 31,1
+	bl  too_far1
+
----------------
sfertile wrote:
> MaskRay wrote:
> > MaskRay wrote:
> > > mixed tab and spaces? Probably move the bl instruction to another `.init` section:
> > > 
> > > ```
> > > .section .init,"ax", at progbits,unique,2
> > > .align 2
> > >   bl too_far1
> > > ```
> > > 
> > > to mimic the crti.o crtn.o `.init`
> > This comment is not done.
> > 
> > You should create several `.init` sections to emulate `.init` used on FreeBSD: it is built from bits spread across several object files.
> > 
> Should we have a simple test simply checking the thunk section spacing for this patch and then have a follow on patch where we fix the thunk insertion to not insert into the middle of `.init` and `.fini` sections and test the multiple .init sections there? 
Sure. I'm not sure on how to check that spacing was applied. I know empirically the offsets are different, so I did this test. 
Any guidance on how to improve this test is welcome.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61610/new/

https://reviews.llvm.org/D61610





More information about the llvm-commits mailing list