add gdb sim sample for h8s
[openadk.git] / toolchain / binutils / patches / 2.29.1 / xtensa-ld-restore-old-section-sorting-behavior.patch
blobb4118378d25d093fd4ffcef9690f3c7bc79be9f2
1 From 3a399127ead1ba3c8b8d0b9e7206fce39311ee72 Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Wed, 2 Aug 2017 02:49:56 -0700
4 Subject: [PATCH] xtensa: ld: restore old section sorting behavior
6 With the recent change 535b785fb0c9 ("Don't compare boolean values
7 against TRUE or FALSE") the following assertion is observed when
8 linking with --sort-section,alignment option:
10 BFD (GNU Binutils) 2.29 assertion fail elf32-xtensa.c:3965
12 It appears that xtensa linker only supported sorting sections by name,
13 and the code that checks for the section sorting type in
14 ld/emultempl/xtensaelf.em was not updated in the change bcaa7b3eb957
15 ("ld/"), that replaced boolean wildcard_spec::sorted with enumeration.
17 Restore the original behavior of the section sorting code.
19 ld/
20 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
22 * emultempl/xtensaelf.em
23 (xtensa_wild_group_interleave_callback): Only check for by_name
24 sorting.
26 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
27 ---
28 Backported from: 73d5923e480944e2d66bde8c59f4dff298ec57e3
30 ld/emultempl/xtensaelf.em | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
33 diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
34 index 1447d526a25b..3827d91b6291 100644
35 --- a/ld/emultempl/xtensaelf.em
36 +++ b/ld/emultempl/xtensaelf.em
37 @@ -1432,7 +1432,7 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement)
38 struct wildcard_list *l;
39 for (l = w->section_list; l != NULL; l = l->next)
41 - if (l->spec.sorted != none)
42 + if (l->spec.sorted == by_name)
44 no_reorder = TRUE;
45 break;
46 --
47 2.1.4