public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used
@ 2016-12-14  9:08 sergiodj+buildbot
  2016-12-14 10:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14  9:08 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b ***

Author: Yury Norov <ynorov@caviumnetworks.com>
Branch: master
Commit: c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

ld: aarch64: fix TLS relaxation where TCB_SIZE is used

TCB_SIZE is 2*sizeof(void *), which is 0x10 for lp64, and 0x8 for
ilp32. During relaxation, ld goes to do a replace:
bl   __tls_get_addr => add R0, R0, TCB_SIZE

But actual implementation is:
bfd_putl32 (0x91004000, contents + rel->r_offset + 4);

Which is equivalent of add x0, x0, 0x10. This is wrong for ilp32.

The possible fix for it is:
bfd_putl32 (0x91000000 | (TCB_SIZE<<10), contents + rel->r_offset + 4);

But ilp32 also needs w-registers, so it's simpler to put proper
instruction in #if/#else condition.

There are 2 such relaxations in elfNN_aarch64_tls_relax(), and so 2 new
tests added for ilp32 mode to test it.

Yury

	* bfd/elfnn-aarch64.c: fix TLS relaxations for ilp32 where
	TCB_SIZE is used.
	* ld/testsuite/ld-aarch64/aarch64-elf.exp: Add tests for the case.
	* ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: New file.
	* ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: New file.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Debian-s390x-native-gdbserver-m64, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
@ 2016-12-14 10:17 ` sergiodj+buildbot
  2016-12-14 10:19 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14 10:17 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	debian-jessie-s390x-1

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Debian-s390x-native-gdbserver-m64/builds/3494>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Debian-s390x-native-gdbserver-m64/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Debian-s390x-m64, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
  2016-12-14 10:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
@ 2016-12-14 10:19 ` sergiodj+buildbot
  2016-12-14 10:34 ` Failures on Fedora-i686, " sergiodj+buildbot
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14 10:19 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	debian-jessie-s390x-1

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Debian-s390x-m64/builds/3495>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Debian-s390x-m64/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Fedora-i686, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
  2016-12-14 10:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
  2016-12-14 10:19 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
@ 2016-12-14 10:34 ` sergiodj+buildbot
  2016-12-14 11:52 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14 10:34 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	fedora-x86-64-4

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Fedora-i686/builds/5031>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Fedora-i686/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
                   ` (2 preceding siblings ...)
  2016-12-14 10:34 ` Failures on Fedora-i686, " sergiodj+buildbot
@ 2016-12-14 11:52 ` sergiodj+buildbot
  2016-12-14 14:25 ` Failures on Debian-i686, " sergiodj+buildbot
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14 11:52 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	fedora-x86-64-4

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-extended-gdbserver-m32/builds/5009>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Fedora-x86_64-native-extended-gdbserver-m32/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>

*** Diff to previous build ***
============================
PASS -> FAIL: gdb.ada/win_fu_syms.exp: compilation foo.adb
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

	<http://git.sergiodj.net/?p=gdb-xfails.git;a=blob;f=xfails/Fedora-x86_64-native-extended-gdbserver-m32/xfails/master/xfail;hb=9d3dc4b>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

	<http://git.sergiodj.net/?p=gdb-xfails.git;a=blob;f=xfails/Fedora-x86_64-native-extended-gdbserver-m32/xfails/master/xfail.table;hb=9d3dc4b>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Debian-i686, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
                   ` (3 preceding siblings ...)
  2016-12-14 11:52 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
@ 2016-12-14 14:25 ` sergiodj+buildbot
  2016-12-19  4:55 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
  2016-12-19  5:54 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14 14:25 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	wildebeest-debian-jessie-i686

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Debian-i686/builds/4703>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Debian-i686/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>

*** Diff to previous build ***
============================
PASS -> FAIL: gdb.threads/multiple-step-overs.exp: displaced=on: next: setup: continue to breakpoint: run to breakpoint in thread 3
PASS -> FAIL: gdb.threads/multiple-step-overs.exp: displaced=on: next: setup: unbreak loop in thread 3
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

	<http://git.sergiodj.net/?p=gdb-xfails.git;a=blob;f=xfails/Debian-i686/xfails/master/xfail;hb=6472016>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

	<http://git.sergiodj.net/?p=gdb-xfails.git;a=blob;f=xfails/Debian-i686/xfails/master/xfail.table;hb=6472016>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Fedora-ppc64be-m64, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
                   ` (4 preceding siblings ...)
  2016-12-14 14:25 ` Failures on Debian-i686, " sergiodj+buildbot
@ 2016-12-19  4:55 ` sergiodj+buildbot
  2016-12-19  5:54 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-19  4:55 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	fedora-ppc64be-1

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Fedora-ppc64be-m64/builds/4731>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Fedora-ppc64be-m64/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
  2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
                   ` (5 preceding siblings ...)
  2016-12-19  4:55 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
@ 2016-12-19  5:54 ` sergiodj+buildbot
  6 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-19  5:54 UTC (permalink / raw)
  To: gdb-testers

Buildslave:
	fedora-ppc64be-1

Full Build URL:
	<http://gdb-build.sergiodj.net/builders/Fedora-ppc64be-native-extended-gdbserver-m64/builds/4720>

Commit(s) tested:
	c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b

Author(s) (in the same order as the commits):
	Yury Norov <ynorov@caviumnetworks.com>

Subject:
	ld: aarch64: fix TLS relaxation where TCB_SIZE is used

Testsuite log (gdb.sum and gdb.log) URL(s):
	<http://gdb-build.sergiodj.net/results/Fedora-ppc64be-native-extended-gdbserver-m64/c1/c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used
@ 2016-12-14  6:47 sergiodj+buildbot
  0 siblings, 0 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2016-12-14  6:47 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 6650f7bd18f8161b9f666d3e65a6346e23a9d85f ***

Author: Yury Norov <ynorov@caviumnetworks.com>
Branch: master
Commit: 6650f7bd18f8161b9f666d3e65a6346e23a9d85f

ld: aarch64: fix TLS relaxation where TCB_SIZE is used

TCB_SIZE is 2*sizeof(void *), which is 0x10 for lp64, and 0x8 for
ilp32. During relaxation, ld goes to do a replace:
bl   __tls_get_addr => add R0, R0, TCB_SIZE

But actual implementation is:
bfd_putl32 (0x91004000, contents + rel->r_offset + 4);

Which is equivalent of add x0, x0, 0x10. This is wrong for ilp32.

The possible fix for it is:
bfd_putl32 (0x91000000 | (TCB_SIZE<<10), contents + rel->r_offset + 4);

But ilp32 also needs w-registers, so it's simpler to put proper
instruction in #if/#else condition.

THere are 2 such relaxations in elfNN_aarch64_tls_relax(), and so 2 new
tests added for ilp32 mode to test it.

Yury


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-19  4:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14  9:08 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot
2016-12-14 10:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
2016-12-14 10:19 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2016-12-14 10:34 ` Failures on Fedora-i686, " sergiodj+buildbot
2016-12-14 11:52 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2016-12-14 14:25 ` Failures on Debian-i686, " sergiodj+buildbot
2016-12-19  4:55 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2016-12-19  5:54 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
  -- strict thread matches above, loose matches on Subject: below --
2016-12-14  6:47 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).