mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 00:32:30 +08:00
Fix the test for PR 18963 so that it will work on 16-bit targets.
PR ld/18963 * testsuite/ld-scripts/pr18963.s: New, replaces empty data.s to allocate space in text, data, bss here rather than pr18963.t. * testsuite/ld-scripts/pr18963.t: Remove assignments to dot. * testsuite/ld-scripts/pr18963.d: Change addresses to fit 16 bits.
This commit is contained in:

committed by
Nick Clifton

parent
381ce63f2f
commit
7a1a12f4d1
@ -1,3 +1,11 @@
|
|||||||
|
2020-04-16 Stephen Casner <casner@acm.org>
|
||||||
|
|
||||||
|
PR ld/18963
|
||||||
|
* testsuite/ld-scripts/pr18963.s: New, replaces empty data.s to
|
||||||
|
allocate space in text, data, bss here rather than pr18963.t.
|
||||||
|
* testsuite/ld-scripts/pr18963.t: Remove assignments to dot.
|
||||||
|
* testsuite/ld-scripts/pr18963.d: Change addresses to fit 16 bits.
|
||||||
|
|
||||||
2020-04-15 Fangrui Song <maskray@google.com>
|
2020-04-15 Fangrui Song <maskray@google.com>
|
||||||
|
|
||||||
PR binutils/24613
|
PR binutils/24613
|
||||||
|
@ -1540,7 +1540,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
|
|||||||
if (s->output_section->vma == 0)
|
if (s->output_section->vma == 0)
|
||||||
{
|
{
|
||||||
/* Huh? Shouldn't happen, but punt if it does. */
|
/* Huh? Shouldn't happen, but punt if it does. */
|
||||||
einfo (_("%P: zero vma section reloc detected: `%s' #%d f=%d\n"),
|
einfo (_("%P: zero vma section reloc detected: `%s' index %d flags %x\n"),
|
||||||
s->output_section->name, s->output_section->index,
|
s->output_section->name, s->output_section->index,
|
||||||
s->output_section->flags);
|
s->output_section->flags);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
# source: data.s
|
# source: pr18963.s
|
||||||
# ld: -T pr18963.t
|
# ld: -T pr18963.t
|
||||||
# nm: -B -n
|
# nm: -B -n
|
||||||
|
# notarget: tic*-*-* ia64-*-* *-*-aix* microblaze-*-* *-*-vms
|
||||||
|
# Skip this test on targets which have sizeof(byte) != sizeof(octet).
|
||||||
|
# On these targets the ".lcomm _bss,0x100" directive does not create
|
||||||
|
# a 0x100 byte long section as needed by the test.
|
||||||
|
# Also skip it for AIX and IA64 targets because they use a non-standard version of .lcomm.
|
||||||
|
# And skip for the microblaze target which does not support a .bss section at all.
|
||||||
|
# Plus skip for VMS based targets as the linker automatically adds extra libraries that may not be present in a cross build.
|
||||||
|
|
||||||
#...
|
#...
|
||||||
0+70000 A D
|
0+a00 . D
|
||||||
#...
|
#...
|
||||||
0+70000 A E
|
0+a00 . E
|
||||||
#...
|
#...
|
||||||
0+80000 T A
|
[02]+b00 T A
|
||||||
#...
|
#...
|
||||||
0+90000 T B
|
[02]+c00 D B
|
||||||
#...
|
#...
|
||||||
0+a0000 D C
|
[02]+d00 . C
|
||||||
#pass
|
#pass
|
||||||
|
7
ld/testsuite/ld-scripts/pr18963.s
Normal file
7
ld/testsuite/ld-scripts/pr18963.s
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.globl _start
|
||||||
|
.text
|
||||||
|
_start:
|
||||||
|
.=.+0x800
|
||||||
|
.data
|
||||||
|
.=.+0x100
|
||||||
|
.lcomm _bss,0x100
|
@ -1,25 +1,20 @@
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = 0x80000;
|
.text 0x300 :
|
||||||
A = .;
|
|
||||||
.text :
|
|
||||||
{
|
{
|
||||||
_start = .;
|
|
||||||
*(.text)
|
*(.text)
|
||||||
. = 0x10000;
|
|
||||||
}
|
}
|
||||||
B = .;
|
A = .;
|
||||||
.data :
|
.data :
|
||||||
{
|
{
|
||||||
*(.data)
|
*(.data)
|
||||||
. = 0x10000;
|
|
||||||
}
|
}
|
||||||
C = .;
|
B = .;
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
*(.bss)
|
*(.bss)
|
||||||
. = 0x10000;
|
|
||||||
}
|
}
|
||||||
|
C = .;
|
||||||
D = A - C + B;
|
D = A - C + B;
|
||||||
E = A + B - C;
|
E = A + B - C;
|
||||||
/DISCARD/ : {*(*)}
|
/DISCARD/ : {*(*)}
|
||||||
|
Reference in New Issue
Block a user