mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 23:26:51 +08:00
Provide .wcookie section for OpenBSD/sparc64.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2005-04-05 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
|
||||||
|
CORE_WCOOKIE_OFFSET.
|
||||||
|
(SPARC64_WCOOKIE_OFFSET): New.
|
||||||
|
(netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
|
||||||
|
|
||||||
2005-04-05 Nick Clifton <nickc@redhat.com>
|
2005-04-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* po/rw.po: New translation: Kinyarwanda
|
* po/rw.po: New translation: Kinyarwanda
|
||||||
|
@ -36,7 +36,11 @@
|
|||||||
|
|
||||||
/* Offset of StackGhost cookie within `struct md_coredump' on
|
/* Offset of StackGhost cookie within `struct md_coredump' on
|
||||||
OpenBSD/sparc. */
|
OpenBSD/sparc. */
|
||||||
#define CORE_WCOOKIE_OFFSET 344
|
#define SPARC_WCOOKIE_OFFSET 344
|
||||||
|
|
||||||
|
/* Offset of StackGhost cookie within `struct md_coredump' on
|
||||||
|
OpenBSD/sparc64. */
|
||||||
|
#define SPARC64_WCOOKIE_OFFSET 832
|
||||||
|
|
||||||
struct netbsd_core_struct
|
struct netbsd_core_struct
|
||||||
{
|
{
|
||||||
@ -130,23 +134,39 @@ netbsd_core_file_p (bfd *abfd)
|
|||||||
asect->filepos = offset;
|
asect->filepos = offset;
|
||||||
asect->alignment_power = 2;
|
asect->alignment_power = 2;
|
||||||
|
|
||||||
if (CORE_GETMID (core) == M_SPARC_NETBSD
|
if (CORE_GETFLAG (coreseg) == CORE_CPU)
|
||||||
&& CORE_GETFLAG (coreseg) == CORE_CPU
|
|
||||||
&& coreseg.c_size > CORE_WCOOKIE_OFFSET)
|
|
||||||
{
|
{
|
||||||
/* Truncate the .reg section. */
|
bfd_size_type wcookie_offset;
|
||||||
asect->size = CORE_WCOOKIE_OFFSET;
|
|
||||||
|
|
||||||
/* And create the .wcookie section. */
|
switch (CORE_GETMID (core))
|
||||||
asect = bfd_make_section_anyway (abfd, ".wcookie");
|
{
|
||||||
if (asect == NULL)
|
case M_SPARC_NETBSD:
|
||||||
goto punt;
|
wcookie_offset = SPARC_WCOOKIE_OFFSET;
|
||||||
|
break;
|
||||||
|
case M_SPARC64_OPENBSD:
|
||||||
|
wcookie_offset = SPARC64_WCOOKIE_OFFSET;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
wcookie_offset = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
|
if (wcookie_offset > 0 && coreseg.c_size > wcookie_offset)
|
||||||
asect->size = 4;
|
{
|
||||||
asect->vma = 0;
|
/* Truncate the .reg section. */
|
||||||
asect->filepos = offset + CORE_WCOOKIE_OFFSET;
|
asect->size = wcookie_offset;
|
||||||
asect->alignment_power = 2;
|
|
||||||
|
/* And create the .wcookie section. */
|
||||||
|
asect = bfd_make_section_anyway (abfd, ".wcookie");
|
||||||
|
if (asect == NULL)
|
||||||
|
goto punt;
|
||||||
|
|
||||||
|
asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
|
||||||
|
asect->size = coreseg.c_size - wcookie_offset;
|
||||||
|
asect->vma = 0;
|
||||||
|
asect->filepos = offset + wcookie_offset;
|
||||||
|
asect->alignment_power = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offset += coreseg.c_size;
|
offset += coreseg.c_size;
|
||||||
|
Reference in New Issue
Block a user