Re: [PATCH] arm64: relocate-rela: Add support for ld.lld

2021-11-16 Thread Tom Rini
On Wed, Oct 20, 2021 at 09:31:32PM +, Alistair Delva wrote:

> Cap end of relocations by the binary size.
> 
> Linkers like to insert some auxiliary sections between .rela.dyn and
> .bss_start. These sections don't make their way to the final binary, but
> reloc_rela still tries to relocate them, resulting in attempted read
> past the end of file.
> 
> When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by
> default on arm64) breaks the build. After this patch, U-Boot can be
> linked successfully with and without CONFIG_STATIC_RELA.
> 
> Originally-from: Elena Petrova 
> Signed-off-by: Alistair Delva 
> Cc: David Brazdil 
> Cc: Scott Wood 
> Cc: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH] arm64: relocate-rela: Add support for ld.lld

2021-10-25 Thread Tom Rini
On Mon, Oct 25, 2021 at 10:46:32AM -0700, Alistair Delva wrote:
> -Scott's ancient non-functioning email address
> 
> Hi Tom,
> 
> On Mon, Oct 25, 2021 at 6:30 AM Tom Rini  wrote:
> >
> > On Wed, Oct 20, 2021 at 09:31:32PM +, Alistair Delva wrote:
> >
> > > Cap end of relocations by the binary size.
> > >
> > > Linkers like to insert some auxiliary sections between .rela.dyn and
> > > .bss_start. These sections don't make their way to the final binary, but
> > > reloc_rela still tries to relocate them, resulting in attempted read
> > > past the end of file.
> > >
> > > When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by
> > > default on arm64) breaks the build. After this patch, U-Boot can be
> > > linked successfully with and without CONFIG_STATIC_RELA.
> > >
> > > Originally-from: Elena Petrova 
> > > Signed-off-by: Alistair Delva 
> > > Cc: David Brazdil 
> > > Cc: Scott Wood 
> > > Cc: Tom Rini 
> >
> > Thanks for the patch.  Do you have any other changes for LLVM/LLDB
> > support on arm64 platforms?  I think I've had a few stumbles whenever
> > I've tried and not been able to cycle back to them.
> 
> I think the patches I posted are enough to get U-Boot to build with
> LLVM LD for QEMU targets on arm64 and x86_64, but I have some other
> build problems to work through on physical device targets like
> rockchip.
> 
> Oddly, the arm64 binaries seem to be booting up (as far as we can see
> in a debugger), but there's no serial output, so there's still some
> work to do.
> 
> I'll keep upstreaming what we find. Our CI system is over here:
> https://ci.android.com/builds/branches/aosp_u-boot-mainline/grid?
> (using Clang but still ld.bfd for now)

OK, thanks!  I would like to see this get to the point of building +
booting, so I can hopefully get a platform or two both in CI and my
local HW CI loop building with clang as well.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH] arm64: relocate-rela: Add support for ld.lld

2021-10-25 Thread Tom Rini
On Wed, Oct 20, 2021 at 09:31:32PM +, Alistair Delva wrote:

> Cap end of relocations by the binary size.
> 
> Linkers like to insert some auxiliary sections between .rela.dyn and
> .bss_start. These sections don't make their way to the final binary, but
> reloc_rela still tries to relocate them, resulting in attempted read
> past the end of file.
> 
> When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by
> default on arm64) breaks the build. After this patch, U-Boot can be
> linked successfully with and without CONFIG_STATIC_RELA.
> 
> Originally-from: Elena Petrova 
> Signed-off-by: Alistair Delva 
> Cc: David Brazdil 
> Cc: Scott Wood 
> Cc: Tom Rini 

Thanks for the patch.  Do you have any other changes for LLVM/LLDB
support on arm64 platforms?  I think I've had a few stumbles whenever
I've tried and not been able to cycle back to them.

-- 
Tom


signature.asc
Description: PGP signature