This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PPC64 GOT alignment trouble


On Fri, Oct 16, 2015 at 05:21:35PM +0100, Andrew Stubbs wrote:
> On 15/10/15 15:21, Alan Modra wrote:
> >Not as it is.  I'm a little worried that the warning will trigger when
> >it shouldn't, and the patch looks to be a bit of a rush job (testing
> >adjust != 0 is better and it would also be better to use
> >TOC_BASE_ALIGN in the warning message rather than hard coding 256).
> >BTW, I'm on vacation tomorrow (huh, today, it's well past midnight),
> >so probably will be "ignoring" you until Monday.
> 
> This version should address the issues with the text.
> 
> It's true that the warning can trigger in cases where there is not actually
> a serious problem (i.e. the r2 register gets set up correctly, even though
> the section is not aligned).
> 
> Given that this problem is likely to bite every PPC64 Linux user if they
> happen to upgrade binutils before the kernel, and who-knows-how-many other
> hidden projects, I'm inclined to lean toward adding the warning.
> 
> Even in the "harmless warning" cases, it would benefit the user to apply the
> alignment, both to prevent wasteful padding in the binary, and to preserve
> the maximum addressable GOT capacity (albeit those are minor wins).
> 
> I don't see that we can actually get a "false positive" here; the message
> will be accurate, even when not helpful.

So I applied the patch and ran the testsuite on powerpc64-linux.
Turns out I was correct to suspect the warning would trigger when it
shouldn't.  These new failures appeared:

FAIL: check sections 1
FAIL: Common symbol override test 3a
FAIL: Common symbol override test 3b
FAIL: Link eh-group.o to eh-group
FAIL: Link using broken linker script
FAIL: ld-elf/comm-data4
FAIL: ld-elf/comm-data5
FAIL: ld-elf/commonpage1
FAIL: ld-elf/compress1a
FAIL: ld-elf/compressed1a
FAIL: ld-elf/dynamic1
FAIL: ld-elf/eh-frame-hdr
FAIL: ld-elf/eh5
FAIL: ld-elf/ehdr_start-userdef
FAIL: ld-elf/ehdr_start-weak
FAIL: ld-elf/ehdr_start
FAIL: ld-elf/empty
FAIL: ld-elf/empty2
FAIL: ld-elf/endsym
FAIL: ld-elf/exclude3a
FAIL: --set-section-flags test 1 (sections)
FAIL: ld-elf/group1
FAIL: ld-elf/header
FAIL: ld-elf/linkonce2
FAIL: ld-elf/loadaddr1
FAIL: ld-elf/loadaddr2
FAIL: ld-elf/maxpage1
FAIL: ld-elf/maxpage2
FAIL: ld-elf/merge
FAIL: ld-elf/merge2
FAIL: ld-elf/merge3
FAIL: ld-elf/note-2
FAIL: Discard orphan sections
FAIL: Place orphan sections
FAIL: ld-elf/orphan
FAIL: ld-elf/orphan3
FAIL: ld-elf/orphan4
FAIL: ld-elf/pr11304
FAIL: ld-elf/pr12851
FAIL: ld-elf/pr14156a
FAIL: ld-elf/pr14156b
FAIL: ld-elf/pr14926
FAIL: ld-elf/pr16498a
FAIL: ld-elf/pr16498b
FAIL: ld-elf/seg
FAIL: ld-elf/stab
FAIL: ld-elf/textaddr1
FAIL: ld-elf/textaddr4
FAIL: ld-elf/textaddr7
FAIL: ld-elf/var1
FAIL: ld-elf/warn1
FAIL: ld-elf/warn2
FAIL: ld-elf/warn3
FAIL: Weak symbols in dynamic objects 1 (main test)
FAIL: --gc-sections on tls variable
FAIL: stack exec
FAIL: stack size
FAIL: PROVIDE_HIDDEN test (auxiliary shared object)
FAIL: PROVIDE_HIDDEN test 4
FAIL: PROVIDE_HIDDEN test 6
FAIL: PROVIDE_HIDDEN test 10
FAIL: PROVIDE_HIDDEN test 12
FAIL: ld-elf/64ksec
FAIL: --sort-common (descending)
FAIL: ld-elfvsb/hidden2
FAIL: ld-elfweak/size2
FAIL: --gc-sections with note section
FAIL: --gc-sections with __start_
FAIL: --gc-sections with multiple debug sections for a function section
FAIL: Could not link a non-ifunc using static executable
FAIL: ld-misc/defsym1
FAIL: PR ld/12758
FAIL: PR ld/12758
FAIL: LTO 16a symbol
FAIL: LTO 16a symbol
FAIL: LTO 16b symbol
FAIL: LTO 16b symbol
FAIL: ld-powerpc/relbrlt
FAIL: ld-powerpc/elfv2-2exe
FAIL: ld-powerpc/defsym
FAIL: align1
FAIL: ld-scripts/align2a
FAIL: ld-scripts/align2b
FAIL: ALIGNOF
FAIL: NOCROSSREFS 3
FAIL: ld-scripts/data
FAIL: ld-scripts/fill
FAIL: ld-scripts/defined2
FAIL: ld-scripts/defined3
FAIL: ld-scripts/pr14962-2
FAIL: binary logarithm
FAIL: map addresses
FAIL: PHDRS
FAIL: PHDRS2
FAIL: PHDRS headers 3a
FAIL: print-memory-usage-2
FAIL: rgn-at1
FAIL: rgn-at3
FAIL: rgn-at4
FAIL: rgn-at5
FAIL: rgn-over1
FAIL: rgn-over2
FAIL: rgn-over4
FAIL: rgn-over5
FAIL: rgn-over6
FAIL: rgn-over7
FAIL: section-flags-1
FAIL: section-flags-2
FAIL: ld-scripts/size-2
FAIL: SIZEOF
FAIL: sysroot-prefix common plain -Lpath, quoted
FAIL: sysroot-prefix common plain -Lpath, unquoted
FAIL: sysroot-prefix common full-path, quoted
FAIL: sysroot-prefix common full-path, unquoted
FAIL: sysroot-prefix common full-path =-prefixed with empty, quoted
FAIL: sysroot-prefix common full-path =-prefixed with empty, unquoted
FAIL: sysroot-prefix common plain =-prefixed with empty, quoted
FAIL: sysroot-prefix common plain =-prefixed with empty, unquoted
FAIL: sysroot-prefix common plain =-prefixed -Lpath, quoted
FAIL: sysroot-prefix common plain =-prefixed -Lpath, unquoted
FAIL: sysroot-prefix common full-path =-prefixed without, quoted
FAIL: sysroot-prefix common full-path =-prefixed without, unquoted
FAIL: Preserve default . = 0
FAIL: Preserve explicit . = 0
FAIL: selective1
FAIL: selective2
FAIL: selective3
FAIL: S-records with constructors
FAIL: --entry foo archive
FAIL: --entry foo -u foo archive
FAIL: --entry foo
FAIL: --entry foo -u foo
FAIL: --entry 0x0
FAIL: Check require-defined can require a symbol from an object
FAIL: Check require-defined does no error on a defined symbol
FAIL: Check require-defined can require a symbol from an archive
FAIL: Check require-defined can require two symbols

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]