public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] qsort: elf_sort_sections use of target_index
@ 2019-10-19 11:09 gdb-buildbot
2019-10-19 11:09 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-19 11:09 UTC (permalink / raw)
To: gdb-testers
*** TEST RESULTS FOR COMMIT 48db3297342d798e58a00771a67b9b4c93412920 ***
commit 48db3297342d798e58a00771a67b9b4c93412920
Author: Alan Modra <amodra@gmail.com>
AuthorDate: Mon Oct 14 13:50:48 2019 +1030
Commit: Alan Modra <amodra@gmail.com>
CommitDate: Mon Oct 14 16:47:13 2019 +1030
qsort: elf_sort_sections use of target_index
elf_sort_sections tried to ensure a stable qsort by using target_index
as the final comparison, but target_index hasn't been set by anything
at the time elf_sort_sections was run. This patch arrange to have
target_index set.
* elf.c (_bfd_elf_map_sections_to_segments): Init target_index
for sections about to be sorted.
(assign_file_positions_for_load_sections): Likewise.
(elf_sort_sections): Don't bother optimising both TOEND case.
* elflink.c (bfd_elf_final_link): Reset target_index.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e9c17584a4..6a5f673dea 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2019-10-14 Alan Modra <amodra@gmail.com>
+
+ * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
+ for sections about to be sorted.
+ (assign_file_positions_for_load_sections): Likewise.
+ (elf_sort_sections): Don't bother optimising both TOEND case.
+ * elflink.c (bfd_elf_final_link): Reset target_index.
+
2019-10-14 Alan Modra <amodra@gmail.com>
* elflink.c (elf_get_linked_section_vma): Delete.
diff --git a/bfd/elf.c b/bfd/elf.c
index cbec4269cf..314c866c3f 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4703,6 +4703,10 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
{
if ((s->flags & SEC_ALLOC) != 0)
{
+ /* target_index is unused until bfd_elf_final_link
+ starts output of section symbols. Use it to make
+ qsort stable. */
+ s->target_index = i;
sections[i] = s;
++i;
/* A wrapping section potentially clashes with header. */
@@ -5270,14 +5274,7 @@ elf_sort_sections (const void *arg1, const void *arg2)
if (TOEND (sec1))
{
- if (TOEND (sec2))
- {
- /* If the indices are the same, do not return 0
- here, but continue to try the next comparison. */
- if (sec1->target_index - sec2->target_index != 0)
- return sec1->target_index - sec2->target_index;
- }
- else
+ if (!TOEND (sec2))
return 1;
}
else if (TOEND (sec2))
@@ -5479,8 +5476,12 @@ assign_file_positions_for_load_sections (bfd *abfd,
if (m->count > 1
&& !(elf_elfheader (abfd)->e_type == ET_CORE
&& m->p_type == PT_NOTE))
- qsort (m->sections, (size_t) m->count, sizeof (asection *),
- elf_sort_sections);
+ {
+ for (i = 0; i < m->count; i++)
+ m->sections[i]->target_index = i;
+ qsort (m->sections, (size_t) m->count, sizeof (asection *),
+ elf_sort_sections);
+ }
/* An ELF segment (described by Elf_Internal_Phdr) may contain a
number of sections with contents contributing to both p_filesz
diff --git a/bfd/elflink.c b/bfd/elflink.c
index fedaf4b5a1..bfd0f019aa 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12048,6 +12048,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
goto error_return;
}
+ /* _bfd_elf_compute_section_file_positions makes temporary use
+ of target_index. Reset it. */
+ o->target_index = 0;
+
/* Now, reset REL_COUNT and REL_COUNT2 so that we can use them
to count upwards while actually outputting the relocations. */
esdo->rel.count = 0;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Failures on Ubuntu-Aarch64-m64, branch master
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
@ 2019-10-19 11:09 ` gdb-buildbot
2019-10-19 12:45 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-19 11:09 UTC (permalink / raw)
To: gdb-testers
Buildername:
Ubuntu-Aarch64-m64
Worker:
ubuntu-aarch64
Full Build URL:
https://gdb-buildbot.osci.io/#builders/8/builds/955
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
48db3297342d798e58a00771a67b9b4c93412920
Subject of commit:
qsort: elf_sort_sections use of target_index
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-m64/48/48db3297342d798e58a00771a67b9b4c93412920/
*** Diff to previous build ***
==============================================
new UNRESOLVED: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: disassemble g
new UNRESOLVED: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: p g_label - g
new UNRESOLVED: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: x/2i g+
new FAIL: gdb.server/ext-restart.exp: monitor exit
new UNRESOLVED: gdb.server/ext-restart.exp: set remote exec-file
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.table.gz>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
2019-10-19 11:09 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
@ 2019-10-19 12:45 ` gdb-buildbot
2019-10-27 4:23 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-19 12:45 UTC (permalink / raw)
To: gdb-testers
Buildername:
Ubuntu-Aarch64-native-extended-gdbserver-m64
Worker:
ubuntu-aarch64
Full Build URL:
https://gdb-buildbot.osci.io/#builders/5/builds/948
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
48db3297342d798e58a00771a67b9b4c93412920
Subject of commit:
qsort: elf_sort_sections use of target_index
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920/
*** Diff to previous build ***
==============================================
new UNRESOLVED: gdb.ada/funcall_ptr.exp: Check that initial value of GA is null
new FAIL: gdb.ada/funcall_ptr.exp: Check that value of GA is 0x1234
new FAIL: gdb.ada/funcall_ptr.exp: call pck.p
new UNRESOLVED: gdb.ada/minsyms.exp: delete all breakpoints in delete_breakpoints
new UNRESOLVED: gdb.ada/ptr_typedef.exp: print my_blob.bees
new UNRESOLVED: gdb.ada/ref_param.exp: delete all breakpoints in delete_breakpoints
new UNRESOLVED: gdb.ada/str_ref_cmp.exp: delete all breakpoints in delete_breakpoints
new UNRESOLVED: gdb.ada/str_ref_cmp.exp: operator = works for strings
new UNRESOLVED: gdb.ada/str_ref_cmp.exp: print String_Var
new UNRESOLVED: gdb.base/info-types.exp: l=c: can't run to main
new UNRESOLVED: gdb.base/solib-display.exp: NO: can't run to main
new UNRESOLVED: gdb.base/stack-checking.exp: can't run to main
new UNRESOLVED: gdb.base/stack-protector.exp: protection=-fno-stack-protector: can't run to main
new UNRESOLVED: gdb.base/stack-protector.exp: protection=-fno-stack-protector: delete all breakpoints in delete_breakpoints
new FAIL: gdb.cp/templates.exp: continue to line 770
new FAIL: gdb.cp/templates.exp: print fint
new FAIL: gdb.cp/templates.exp: print fvpchar
new FAIL: gdb.cp/templates.exp: ptype bazint
new FAIL: gdb.cp/templates.exp: ptype bazint2
new FAIL: gdb.cp/templates.exp: ptype bint
new FAIL: gdb.cp/templates.exp: ptype bint2
new FAIL: gdb.cp/templates.exp: ptype fchar
new FAIL: gdb.cp/templates.exp: ptype fint
new FAIL: gdb.cp/templates.exp: ptype fvpchar
new FAIL: gdb.cp/templates.exp: ptype quxint
new FAIL: gdb.cp/templates.exp: ptype siip
new UNRESOLVED: gdb.cp/templates.exp: set multiple-symbols ask
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: get integer valueof "sizeof
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: p bar_label - bar
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: p baz_label - baz
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: p foo_cold_label - foo_cold
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: p foo_label - foo
new UNRESOLVED: gdb.dwarf2/dw2-ranges-func.exp: lo-cold: p main_label - main
new UNRESOLVED: gdb.dwarf2/gdb-add-index.exp: index used
new UNRESOLVED: gdb.dwarf2/implptr-optimized-out.exp: failed to prepare
new UNRESOLVED: gdb.dwarf2/missing-sig-type.exp: ptype foo
new UNRESOLVED: gdb.dwarf2/nonvar-access.exp: disassemble main
new UNRESOLVED: gdb.dwarf2/nonvar-access.exp: p main_label - main
new UNRESOLVED: gdb.dwarf2/nonvar-access.exp: x/2i main+
new UNRESOLVED: gdb.guile/scm-breakpoint.exp: Guile support is disabled.
new UNRESOLVED: gdb.guile/scm-gsmob.exp: Guile support is disabled.
new UNRESOLVED: gdb.python/py-frame-inline.exp: can't run to function f
new UNRESOLVED: gdb.python/py-recurse-unwind.exp: import python scripts
new FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2
new FAIL: gdb.reverse/recvmsg-reverse.exp: reverse to marker1
new UNRESOLVED: gdb.reverse/recvmsg-reverse.exp: turn on process record
new UNRESOLVED: gdb.trace/mi-tsv-changed.exp: can't run to main to check for trace support
new UNRESOLVED: gdb.trace/mi-tsv-changed.exp: create delete modify: can't run to main to check for trace support
new UNRESOLVED: gdb.trace/mi-tsv-changed.exp: create delete modify: tvariable $tvar1
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.table.gz>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
2019-10-19 11:09 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-19 12:45 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
@ 2019-10-27 4:23 ` gdb-buildbot
2019-10-27 5:38 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-10-27 6:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
4 siblings, 0 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-27 4:23 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m32
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/4/builds/1070
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
48db3297342d798e58a00771a67b9b4c93412920
Subject of commit:
qsort: elf_sort_sections use of target_index
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/48/48db3297342d798e58a00771a67b9b4c93412920/
*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.table.gz>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Failures on Fedora-x86_64-m64, branch master
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
` (2 preceding siblings ...)
2019-10-27 4:23 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
@ 2019-10-27 5:38 ` gdb-buildbot
2019-10-27 6:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
4 siblings, 0 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-27 5:38 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-m64
Worker:
fedora-x86-64-2
Full Build URL:
https://gdb-buildbot.osci.io/#builders/3/builds/1122
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
48db3297342d798e58a00771a67b9b4c93412920
Subject of commit:
qsort: elf_sort_sections use of target_index
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/48/48db3297342d798e58a00771a67b9b4c93412920/
*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.table.gz>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Failures on Fedora-x86_64-native-gdbserver-m64, branch master
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
` (3 preceding siblings ...)
2019-10-27 5:38 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
@ 2019-10-27 6:59 ` gdb-buildbot
4 siblings, 0 replies; 6+ messages in thread
From: gdb-buildbot @ 2019-10-27 6:59 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-gdbserver-m64
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/22/builds/1071
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
48db3297342d798e58a00771a67b9b4c93412920
Subject of commit:
qsort: elf_sort_sections use of target_index
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920/
*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/info-os.exp: continue
PASS -> FAIL: gdb.base/info-os.exp: get file descriptors
PASS -> FAIL: gdb.base/info-os.exp: get internet-domain sockets
PASS -> FAIL: gdb.base/info-os.exp: get message queues
PASS -> FAIL: gdb.base/info-os.exp: get process groups
PASS -> FAIL: gdb.base/info-os.exp: get semaphores
PASS -> FAIL: gdb.base/info-os.exp: get shared-memory regions
PASS -> FAIL: gdb.base/info-os.exp: get threads
PASS -> FAIL: gdb.base/info-os.exp: info os unknown_entry
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/48/48db3297342d798e58a00771a67b9b4c93412920//xfail.table.gz>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-27 6:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 11:09 [binutils-gdb] qsort: elf_sort_sections use of target_index gdb-buildbot
2019-10-19 11:09 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-19 12:45 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
2019-10-27 4:23 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-10-27 5:38 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-10-27 6:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-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).