tic6x: Call _bfd_elf_add_dynamic_tags
Update tic6x linker tests to expect C6000_DSBT_BASE, C6000_DSBT_SIZE and C6000_DSBT_INDEX dynamic tags immediately before NULL dynamic tag. bfd/ * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags. ld/ * testsuite/ld-tic6x/shlib-1.rd: Move C6000_DSBT_BASE, C6000_DSBT_SIZE and C6000_DSBT_INDEX dynamic tags to the last. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
This commit is contained in:
parent
a3ca48cdda
commit
a57f74bb7c
|
@ -1,3 +1,8 @@
|
|||
2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
|
||||
_bfd_elf_add_dynamic_tags.
|
||||
|
||||
2020-06-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
|
||||
|
|
|
@ -3352,11 +3352,8 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
|||
#define add_dynamic_entry(TAG, VAL) \
|
||||
_bfd_elf_add_dynamic_entry (info, TAG, VAL)
|
||||
|
||||
if (bfd_link_executable (info))
|
||||
{
|
||||
if (!add_dynamic_entry (DT_DEBUG, 0))
|
||||
return FALSE;
|
||||
}
|
||||
if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs))
|
||||
return FALSE;
|
||||
|
||||
if (!add_dynamic_entry (DT_C6000_DSBT_BASE, 0)
|
||||
|| !add_dynamic_entry (DT_C6000_DSBT_SIZE, htab->params.dsbt_size)
|
||||
|
@ -3364,34 +3361,6 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
|||
htab->params.dsbt_index))
|
||||
return FALSE;
|
||||
|
||||
if (htab->elf.splt->size != 0)
|
||||
{
|
||||
if (!add_dynamic_entry (DT_PLTGOT, 0)
|
||||
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
|
||||
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
|
||||
|| !add_dynamic_entry (DT_JMPREL, 0))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (relocs)
|
||||
{
|
||||
if (!add_dynamic_entry (DT_RELA, 0)
|
||||
|| !add_dynamic_entry (DT_RELASZ, 0)
|
||||
|| !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
|
||||
return FALSE;
|
||||
|
||||
/* If any dynamic relocs apply to a read-only section,
|
||||
then we need a DT_TEXTREL entry. */
|
||||
if ((info->flags & DF_TEXTREL) == 0)
|
||||
elf_link_hash_traverse (&htab->elf,
|
||||
_bfd_elf_maybe_set_textrel, info);
|
||||
|
||||
if ((info->flags & DF_TEXTREL) != 0)
|
||||
{
|
||||
if (!add_dynamic_entry (DT_TEXTREL, 0))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef add_dynamic_entry
|
||||
|
||||
|
|
17
ld/ChangeLog
17
ld/ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* testsuite/ld-tic6x/shlib-1.rd: Move C6000_DSBT_BASE,
|
||||
C6000_DSBT_SIZE and C6000_DSBT_INDEX dynamic tags to the last.
|
||||
* testsuite/ld-tic6x/shlib-1b.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-1r.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-app-1.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-app-1b.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-app-1r.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise.
|
||||
* testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
|
||||
* testsuite/ld-tic6x/static-app-1.rd: Likewise.
|
||||
* testsuite/ld-tic6x/static-app-1b.rd: Likewise.
|
||||
* testsuite/ld-tic6x/static-app-1r.rd: Likewise.
|
||||
* testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
|
||||
|
||||
2020-06-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* testsuite/ld-x86-64/abs-k1om.d: Run only on x86_64-*-linux*.
|
||||
|
|
|
@ -47,9 +47,6 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000006 \(SYMTAB\) 0x8044
|
||||
0x0000000a \(STRSZ\) 18 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000003 \(PLTGOT\) 0x1000010c
|
||||
0x00000002 \(PLTRELSZ\) 24 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -57,6 +54,9 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000007 \(RELA\) 0x8118
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1118 contains 3 entries:
|
||||
|
|
|
@ -47,9 +47,6 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000006 \(SYMTAB\) 0x8044
|
||||
0x0000000a \(STRSZ\) 18 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000003 \(PLTGOT\) 0x1000010c
|
||||
0x00000002 \(PLTRELSZ\) 24 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -57,6 +54,9 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000007 \(RELA\) 0x8118
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1118 contains 3 entries:
|
||||
|
|
|
@ -47,9 +47,6 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000006 \(SYMTAB\) 0x8044
|
||||
0x0000000a \(STRSZ\) 18 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000003 \(PLTGOT\) 0x1000010c
|
||||
0x00000002 \(PLTRELSZ\) 24 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -57,6 +54,9 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000007 \(RELA\) 0x8118
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1118 contains 3 entries:
|
||||
|
|
|
@ -47,9 +47,6 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000006 \(SYMTAB\) 0x8044
|
||||
0x0000000a \(STRSZ\) 18 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000003 \(PLTGOT\) 0x1000010c
|
||||
0x00000002 \(PLTRELSZ\) 24 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -57,6 +54,9 @@ Dynamic section at offset 0x1154 contains 16 entries:
|
|||
0x00000007 \(RELA\) 0x8118
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x2
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1118 contains 3 entries:
|
||||
|
|
|
@ -50,9 +50,6 @@ Dynamic section at offset 0x1150 contains 18 entries:
|
|||
0x0000000a \(STRSZ\) 34 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000003 \(PLTGOT\) 0x100000ac
|
||||
0x00000002 \(PLTRELSZ\) 12 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -60,6 +57,9 @@ Dynamic section at offset 0x1150 contains 18 entries:
|
|||
0x00000007 \(RELA\) 0x8114
|
||||
0x00000008 \(RELASZ\) 72 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1114 contains 2 entries:
|
||||
|
|
|
@ -50,9 +50,6 @@ Dynamic section at offset 0x1150 contains 18 entries:
|
|||
0x0000000a \(STRSZ\) 35 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000003 \(PLTGOT\) 0x100000ac
|
||||
0x00000002 \(PLTRELSZ\) 12 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -60,6 +57,9 @@ Dynamic section at offset 0x1150 contains 18 entries:
|
|||
0x00000007 \(RELA\) 0x8114
|
||||
0x00000008 \(RELASZ\) 72 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x1114 contains 2 entries:
|
||||
|
|
|
@ -49,9 +49,6 @@ Dynamic section at offset 0x110c contains 18 entries:
|
|||
0x0000000a \(STRSZ\) 29 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000003 \(PLTGOT\) 0x100000ac
|
||||
0x00000002 \(PLTRELSZ\) 12 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -59,6 +56,9 @@ Dynamic section at offset 0x110c contains 18 entries:
|
|||
0x00000007 \(RELA\) 0x80e8
|
||||
0x00000008 \(RELASZ\) 48 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10e8 contains 2 entries:
|
||||
|
|
|
@ -49,9 +49,6 @@ Dynamic section at offset 0x110c contains 18 entries:
|
|||
0x0000000a \(STRSZ\) 30 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000003 \(PLTGOT\) 0x100000ac
|
||||
0x00000002 \(PLTRELSZ\) 12 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -59,6 +56,9 @@ Dynamic section at offset 0x110c contains 18 entries:
|
|||
0x00000007 \(RELA\) 0x80e8
|
||||
0x00000008 \(RELASZ\) 48 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000a0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10e8 contains 2 entries:
|
||||
|
|
|
@ -48,9 +48,6 @@ Dynamic section at offset 0x1160 contains 17 entries:
|
|||
0x00000006 \(SYMTAB\) 0x8044
|
||||
0x0000000a \(STRSZ\) 18 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000003 \(PLTGOT\) 0x1000010c
|
||||
0x00000002 \(PLTRELSZ\) 24 \(bytes\)
|
||||
0x00000014 \(PLTREL\) RELA
|
||||
|
@ -59,6 +56,9 @@ Dynamic section at offset 0x1160 contains 17 entries:
|
|||
0x00000008 \(RELASZ\) 96 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x00000016 \(TEXTREL\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x10000100
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.text' at offset 0x1118 contains 1 entry:
|
||||
|
|
|
@ -46,12 +46,12 @@ Dynamic section at offset 0x1128 contains 13 entries:
|
|||
0x0000000a \(STRSZ\) 10 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000007 \(RELA\) 0x80d4
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10d4 contains 3 entries:
|
||||
|
|
|
@ -46,12 +46,12 @@ Dynamic section at offset 0x1128 contains 13 entries:
|
|||
0x0000000a \(STRSZ\) 10 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000007 \(RELA\) 0x80d4
|
||||
0x00000008 \(RELASZ\) 84 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10d4 contains 3 entries:
|
||||
|
|
|
@ -46,12 +46,12 @@ Dynamic section at offset 0x1110 contains 13 entries:
|
|||
0x0000000a \(STRSZ\) 10 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000007 \(RELA\) 0x80d4
|
||||
0x00000008 \(RELASZ\) 60 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10d4 contains 3 entries:
|
||||
|
|
|
@ -46,12 +46,12 @@ Dynamic section at offset 0x1110 contains 13 entries:
|
|||
0x0000000a \(STRSZ\) 10 \(bytes\)
|
||||
0x0000000b \(SYMENT\) 16 \(bytes\)
|
||||
0x00000015 \(DEBUG\) 0x0
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000007 \(RELA\) 0x80d4
|
||||
0x00000008 \(RELASZ\) 60 \(bytes\)
|
||||
0x00000009 \(RELAENT\) 12 \(bytes\)
|
||||
0x70000000 \(C6000_DSBT_BASE\) 0x100000c0
|
||||
0x70000001 \(C6000_DSBT_SIZE\) 0x3
|
||||
0x70000003 \(C6000_DSBT_INDEX\) 0x0
|
||||
0x00000000 \(NULL\) 0x0
|
||||
|
||||
Relocation section '\.rela\.got' at offset 0x10d4 contains 3 entries:
|
||||
|
|
Loading…
Reference in New Issue