Commit 7eeb0f59 authored by Karsten Merker's avatar Karsten Merker
Browse files

Import Debian changes 0.176-1.1

elfutils (0.176-1.1) unstable; urgency=medium

  * Non-maintainer upload with maintainer permission
  * Fixes FTBFS on riscv64 (Closes: #928832)

elfutils (0.176-1) unstable; urgency=medium

  * New upstream release
    - Fixes CVE-2019-7150 (Closes: #920909)
    - Fixes CVE-2019-7149 (Closes: #920910)
    - Fixes CVE-2019-7146 (Closes: #920911)
    - Fixes CVE-2019-7665 (Closes: #921880)
    - Fixes CVE-2019-7664 (Closes: #921881)
    - Fixes CVE-2019-7148
    - Drop 0001-tests-Call-test_cleanup-in-backtrace-subr.sh-check_u.patch,
      applied upstream.
  * Update upstream PGP key to new one
parents d92f49d0 79350562
Pipeline #209605 passed with stages
2019-02-14 Mark Wielaard <mark@klomp.org>
* configure.ac: Set version to 0.176.
* NEWS: Mention riscv backend updates, new --enable-install-elfh
configure flag and fixed CVEs.
* GPG-KEY: Update.
2019-01-18 Mark Wielaard <mark@klomp.org>
* configure.ac: Add new --enable-install-elfh.
2018-07-04 Ross Burton <ross.burton@intel.com>
* configure.ac: Check for gawk.
......
Public key for drepper@redhat.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)
mQGiBDuFth0RBACPcHEkyqJE26wTXuuuCxpqJjxlBnNFkJGkWUoeu89QjzWgzXy/
EA8+ptNBgCTPKnLEqhkRUyxAT/Uz+t+xbKqUtL54IzYfxO4NQsN/VVM0uppNfIJb
MWvAjvpp2HCkd/32i693rlH+G9dvG8K57by3PBRHBgH2L8Q7t/QvA2AWpwCgzokX
DDUiitysGn4rWO0rBBoR6OED/3ehpcHtbGixNoubRZAxpw99VTKs/I76OkrQzqcm
+w+zwZeihJXC88yAHA77/LBB3YKaX3G4CmDQUbeRJ9zPlETTLmRMcF61dQdq/3qV
Biq1sm6ctZ4uEpm8HnysKMT+VY4Xmj9LLzF2BdING9frcX9rk8Vk25iCLBronS0M
IU3WA/sEvl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L7Y/Zn6st3Zio
O7LXq3ghkWf8JR7ZaUFIY6P1qS5heiCHP0PxQJSrtpYzH3rKJoHpIkjxnsB/sD0C
05cAdlzXBTUVTNLY+DPlQ7FeRkG+VK91briG4tvQ8ohhEiC9HuJu1AKMNWBZ9qeU
wsXaJvNzABEBAAGJAjYEGAEKACAWIQTsPP6I9soHiHdPXB0apEvmSd52CgUCXEO7
ogIbIAAKCRAapEvmSd52Ch8ZD/9wKuIlaRMSB1AMCwhGPaqXZahrJ649Y0jI4Jqp
FKv2/U5hKHOG7bihRAeEj7pZzhlgBrkZg1SBdZ3vHs1ufElnfe5RQApdDm93daU5
SP29iEivJQxKjF91EfEffl0trxxztBipI5/2D+kaS8cnNVfzo5ZEWy/cd6AShvRV
HM7Y2QHc+mlaZhYhBvTtwC6avXNnG55WYgobGENeAwkyD072JF3XrxFb+XkcKxla
9yRdWdHxJd5PYJqsKM+nVeJM226OwOyU235gfIhIP6pfGqF9UVH0uFoCYkVkUSjV
d96Q+Cj0kdhTOrtLW1OY11d9TBxje42GOtc7X9Zzx1nhwU8rCCErF9/uJIJKlq7I
08rMX3rFDTtizwN7g7ZBkDDiZO+BIKQPt/awA9NM+tda02hyfQokBBi+v8b/iKif
KIfUaqPDo1PA5uxljdluyX8AXIotKjJXF6Elsiz7bVpcIc0ZXOOFr9ylmtZm51YN
mOzDNznEBmol2oBZfsk2G55/QgShHmKUnvzKANBGfnfS/a/K7Hv4sfZAb58Prl6O
mQSrkmhzFry/4BNLKq+nd4s8VXkJPpx3Ogf3DoIynqpNF0bwf52U5IgJSNcJN/Hr
AwhaG1W+Y3LDe7S19M0cUzftEUeq3Jd89hoijC72tdba+BRfW0ncfvEcsk9QifSU
1tvZxQ==
=l2J7
-----END PGP PUBLIC KEY BLOCK-----
......@@ -364,7 +364,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......
Version 0.176
build: Add new --enable-install-elfh option.
Do NOT use this for system installs (it overrides glibc elf.h).
backends: riscv improved core file and return value location support.
Fixes CVE-2019-7146, CVE-2019-7148, CVE-2019-7149, CVE-2019-7150,
CVE-2019-7664, CVE-2019-7665
Version 0.175
readelf: Handle mutliple .debug_macro sections.
......
2019-02-15 Mark Wielaard <mark@klomp.org>
* s390_init.c (s390_init): Hook check_special_symbol.
* s390_symbol.c (s390_check_sepcial_symbol): New function.
2018-12-27 Jim Wilson <jimw@sifive.com>
* Makefile.am (riscv_SRCS): Add riscv64_corenote.c.
* riscv64_corenote.c: New file.
* riscv_corenote.c (BITS): New.
(BACKEND): Conditional on BITS.
(ULONG, UID_T, GID_T, ALIGN_ULONG, ALIGN_UID_T, ALIGN_GID_T): Likewise.
(TYPE_ULONG, TYPE_UID_T, TYPE_GID_T): Likewise.
(prstatus_regs): Use BITS/8 instead of 8.
(PRSTATUS_REGS_SIZE): Likewise.
* riscv_init.c (riscv64_core_note): Declare.
(riscv_init): If ELFCLASS64 then use riscv64_core_note hook.
* Makefile.am (riscv_SRCS): Add riscv_retval.c.
* riscv_init.c: Include libelfP.h.
(riscv_return_value_location_lp64d): Declare.
(riscv_init): Delete unused attribute from elf parameter. Register
riscv_return_value_location_lp64d hook if 64-bit ELF and 64-bit FP
registers.
* riscv_retval.c: New file.
* riscv_corenote.c (prstatus_regs): Change offset from 1 to 8.
(PRSTATUS_REGSET_ITEMS): New.
2018-11-06 Mark Wielaard <mark@klomp.org>
* x86_64_symbol.c (x86_64_section_type_name): New function.
......
......@@ -132,7 +132,7 @@ libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
riscv_initreg.c riscv_corenote.c
riscv_initreg.c riscv_corenote.c riscv64_corenote.c riscv_retval.c
libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
......
......@@ -174,7 +174,8 @@ libebl_riscv_pic_a_AR = $(AR) $(ARFLAGS)
libebl_riscv_pic_a_LIBADD =
am__objects_10 = riscv_init.$(OBJEXT) riscv_symbol.$(OBJEXT) \
riscv_cfi.$(OBJEXT) riscv_regs.$(OBJEXT) \
riscv_initreg.$(OBJEXT) riscv_corenote.$(OBJEXT)
riscv_initreg.$(OBJEXT) riscv_corenote.$(OBJEXT) \
riscv64_corenote.$(OBJEXT) riscv_retval.$(OBJEXT)
libebl_riscv_pic_a_OBJECTS = $(am_libebl_riscv_pic_a_OBJECTS)
libebl_s390_pic_a_AR = $(AR) $(ARFLAGS)
libebl_s390_pic_a_LIBADD =
......@@ -259,9 +260,10 @@ am__depfiles_remade = ./$(DEPDIR)/aarch64_cfi.Po \
./$(DEPDIR)/ppc_init.Po ./$(DEPDIR)/ppc_initreg.Po \
./$(DEPDIR)/ppc_regs.Po ./$(DEPDIR)/ppc_retval.Po \
./$(DEPDIR)/ppc_symbol.Po ./$(DEPDIR)/ppc_syscall.Po \
./$(DEPDIR)/riscv_cfi.Po ./$(DEPDIR)/riscv_corenote.Po \
./$(DEPDIR)/riscv_init.Po ./$(DEPDIR)/riscv_initreg.Po \
./$(DEPDIR)/riscv_regs.Po ./$(DEPDIR)/riscv_symbol.Po \
./$(DEPDIR)/riscv64_corenote.Po ./$(DEPDIR)/riscv_cfi.Po \
./$(DEPDIR)/riscv_corenote.Po ./$(DEPDIR)/riscv_init.Po \
./$(DEPDIR)/riscv_initreg.Po ./$(DEPDIR)/riscv_regs.Po \
./$(DEPDIR)/riscv_retval.Po ./$(DEPDIR)/riscv_symbol.Po \
./$(DEPDIR)/s390_cfi.Po ./$(DEPDIR)/s390_corenote.Po \
./$(DEPDIR)/s390_init.Po ./$(DEPDIR)/s390_initreg.Po \
./$(DEPDIR)/s390_regs.Po ./$(DEPDIR)/s390_retval.Po \
......@@ -464,7 +466,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......@@ -497,7 +498,7 @@ ARFLAGS = cr
# warning
@HAVE_IMPLICIT_FALLTHROUGH_WARNING_TRUE@IMPLICIT_FALLTHROUGH_WARNING = -Wimplicit-fallthrough=5
AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
-Wold-style-definition -Wstrict-prototypes \
-Wold-style-definition -Wstrict-prototypes -Wtrampolines \
$(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
$(if $($(*F)_no_Werror),,-Werror) \
......@@ -610,7 +611,7 @@ cpu_bpf = ../libcpu/libcpu_bpf.a
libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
riscv_initreg.c riscv_corenote.c
riscv_initreg.c riscv_corenote.c riscv64_corenote.c riscv_retval.c
libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
......@@ -798,11 +799,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_retval.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_symbol.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_syscall.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv64_corenote.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_cfi.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_corenote.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_init.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_initreg.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_regs.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_retval.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv_symbol.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s390_cfi.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s390_corenote.Po@am__quote@ # am--include-marker
......@@ -1050,11 +1053,13 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/ppc_retval.Po
-rm -f ./$(DEPDIR)/ppc_symbol.Po
-rm -f ./$(DEPDIR)/ppc_syscall.Po
-rm -f ./$(DEPDIR)/riscv64_corenote.Po
-rm -f ./$(DEPDIR)/riscv_cfi.Po
-rm -f ./$(DEPDIR)/riscv_corenote.Po
-rm -f ./$(DEPDIR)/riscv_init.Po
-rm -f ./$(DEPDIR)/riscv_initreg.Po
-rm -f ./$(DEPDIR)/riscv_regs.Po
-rm -f ./$(DEPDIR)/riscv_retval.Po
-rm -f ./$(DEPDIR)/riscv_symbol.Po
-rm -f ./$(DEPDIR)/s390_cfi.Po
-rm -f ./$(DEPDIR)/s390_corenote.Po
......@@ -1203,11 +1208,13 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/ppc_retval.Po
-rm -f ./$(DEPDIR)/ppc_symbol.Po
-rm -f ./$(DEPDIR)/ppc_syscall.Po
-rm -f ./$(DEPDIR)/riscv64_corenote.Po
-rm -f ./$(DEPDIR)/riscv_cfi.Po
-rm -f ./$(DEPDIR)/riscv_corenote.Po
-rm -f ./$(DEPDIR)/riscv_init.Po
-rm -f ./$(DEPDIR)/riscv_initreg.Po
-rm -f ./$(DEPDIR)/riscv_regs.Po
-rm -f ./$(DEPDIR)/riscv_retval.Po
-rm -f ./$(DEPDIR)/riscv_symbol.Po
-rm -f ./$(DEPDIR)/s390_cfi.Po
-rm -f ./$(DEPDIR)/s390_corenote.Po
......
#define BITS 64
#include "riscv_corenote.c"
......@@ -35,26 +35,54 @@
#include <stdio.h>
#include <sys/time.h>
#define BACKEND riscv_
#ifndef BITS
# define BITS 32
# define BACKEND riscv_
#else
# define BITS 64
# define BACKEND riscv64_
#endif
#include "libebl_CPU.h"
#define ULONG uint64_t
#if BITS == 32
# define ULONG uint32_t
# define UID_T uint16_t
# define GID_T uint16_t
# define ALIGN_ULONG 4
# define ALIGN_UID_T 2
# define ALIGN_GID_T 2
# define TYPE_ULONG ELF_T_WORD
# define TYPE_UID_T ELF_T_HALF
# define TYPE_GID_T ELF_T_HALF
#else
# define ULONG uint64_t
# define UID_T uint32_t
# define GID_T uint32_t
# define ALIGN_ULONG 8
# define ALIGN_UID_T 4
# define ALIGN_GID_T 4
# define TYPE_ULONG ELF_T_XWORD
# define TYPE_UID_T ELF_T_WORD
# define TYPE_GID_T ELF_T_WORD
#endif
#define PID_T int32_t
#define UID_T uint32_t
#define GID_T uint32_t
#define ALIGN_ULONG 8
#define ALIGN_PID_T 4
#define ALIGN_UID_T 4
#define ALIGN_GID_T 4
#define TYPE_ULONG ELF_T_XWORD
#define TYPE_PID_T ELF_T_SWORD
#define TYPE_UID_T ELF_T_WORD
#define TYPE_GID_T ELF_T_WORD
static const Ebl_Register_Location prstatus_regs[] =
{
{ .offset = 1, .regno = 1, .count = 31, .bits = 64 } /* x1..x31 */
{ .offset = BITS/8, .regno = 1, .count = 31, .bits = BITS } /* x1..x31 */
};
#define PRSTATUS_REGS_SIZE (32 * 8)
#define PRSTATUS_REGS_SIZE (32 * (BITS/8))
#define PRSTATUS_REGSET_ITEMS \
{ \
.name = "pc", .type = ELF_T_ADDR, .format = 'x', \
.offset = offsetof (struct EBLHOOK(prstatus), pr_reg[0]), \
.group = "register", .pc_register = true \
}
#include "linux-core-note.c"
......@@ -33,12 +33,18 @@
#define RELOC_PREFIX R_RISCV_
#include "libebl_CPU.h"
#include "libelfP.h"
/* This defines the common reloc hooks based on riscv_reloc.def. */
#include "common-reloc.c"
extern __typeof (EBLHOOK (return_value_location))
riscv_return_value_location_lp64d attribute_hidden;
extern __typeof (EBLHOOK (core_note)) riscv64_core_note attribute_hidden;
const char *
riscv_init (Elf *elf __attribute__ ((unused)),
riscv_init (Elf *elf,
GElf_Half machine __attribute__ ((unused)),
Ebl *eh,
size_t ehlen)
......@@ -58,7 +64,14 @@ riscv_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, check_special_symbol);
HOOK (eh, machine_flag_check);
HOOK (eh, set_initial_registers_tid);
HOOK (eh, core_note);
if (eh->class == ELFCLASS64)
eh->core_note = riscv64_core_note;
else
HOOK (eh, core_note);
if (eh->class == ELFCLASS64
&& ((elf->state.elf64.ehdr->e_flags & EF_RISCV_FLOAT_ABI)
== EF_RISCV_FLOAT_ABI_DOUBLE))
eh->return_value_location = riscv_return_value_location_lp64d;
return MODVERSION;
}
/* Function return value location for Linux/RISC-V ABI.
Copyright (C) 2018 Sifive, Inc.
Copyright (C) 2013 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
it under the terms of either
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at
your option) any later version
or
* the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at
your option) any later version
or both in parallel, as here.
elfutils is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received copies of the GNU General Public License and
the GNU Lesser General Public License along with this program. If
not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <inttypes.h>
#include <assert.h>
#include <dwarf.h>
#define BACKEND riscv_
#include "libebl_CPU.h"
static int
dwarf_bytesize_aux (Dwarf_Die *die, Dwarf_Word *sizep)
{
int bits;
if (((bits = 8 * dwarf_bytesize (die)) < 0
&& (bits = dwarf_bitsize (die)) < 0)
|| bits % 8 != 0)
return -1;
*sizep = bits / 8;
return 0;
}
static int
pass_in_gpr_lp64 (const Dwarf_Op **locp, Dwarf_Word size)
{
static const Dwarf_Op loc[] =
{
{ .atom = DW_OP_reg10 }, { .atom = DW_OP_piece, .number = 8 },
{ .atom = DW_OP_reg11 }, { .atom = DW_OP_piece, .number = 8 }
};
*locp = loc;
return size <= 8 ? 1 : 4;
}
static int
pass_by_ref (const Dwarf_Op **locp)
{
static const Dwarf_Op loc[] = { { .atom = DW_OP_breg10 } };
*locp = loc;
return 1;
}
static int
pass_in_fpr_lp64f (const Dwarf_Op **locp, Dwarf_Word size)
{
static const Dwarf_Op loc[] =
{
{ .atom = DW_OP_regx, .number = 42 },
{ .atom = DW_OP_piece, .number = 4 },
{ .atom = DW_OP_regx, .number = 43 },
{ .atom = DW_OP_piece, .number = 4 }
};
*locp = loc;
return size <= 4 ? 1 : 4;
}
static int
pass_in_fpr_lp64d (const Dwarf_Op **locp, Dwarf_Word size)
{
static const Dwarf_Op loc[] =
{
{ .atom = DW_OP_regx, .number = 42 },
{ .atom = DW_OP_piece, .number = 8 },
{ .atom = DW_OP_regx, .number = 43 },
{ .atom = DW_OP_piece, .number = 8 }
};
*locp = loc;
return size <= 8 ? 1 : 4;
}
static int
flatten_aggregate_arg (Dwarf_Die *typedie __attribute__ ((unused)),
Dwarf_Die *arg0 __attribute__ ((unused)),
Dwarf_Die *arg1 __attribute__ ((unused)))
{
/* ??? */
return 1;
}
static int
pass_by_flattened_arg (const Dwarf_Op **locp __attribute__ ((unused)),
Dwarf_Word size __attribute__ ((unused)),
Dwarf_Die *arg0 __attribute__ ((unused)),
Dwarf_Die *arg1 __attribute__ ((unused)))
{
/* ??? */
return -2;
}
int
riscv_return_value_location_lp64d (Dwarf_Die *functypedie,
const Dwarf_Op **locp)
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
Dwarf_Die typedie;
int tag = dwarf_peeled_die_type (functypedie, &typedie);
if (tag <= 0)
return tag;
Dwarf_Word size = (Dwarf_Word)-1;
/* If the argument type is a Composite Type that is larger than 16
bytes, then the argument is copied to memory allocated by the
caller and the argument is replaced by a pointer to the copy. */
if (tag == DW_TAG_structure_type || tag == DW_TAG_union_type
|| tag == DW_TAG_class_type || tag == DW_TAG_array_type)
{
Dwarf_Die arg0, arg1;
if (dwarf_aggregate_size (&typedie, &size) < 0)
return -1;
/* A struct containing just one floating-point real is passed as though
it were a standalone floating-point real. A struct containing two
floating-point reals is passed in two floating-point registers, if
neither is more than FLEN bits wide. A struct containing just one
complex floating-point number is passed as though it were a struct
containing two floating-point reals. A struct containing one
floating-point real and one integer (or bitfield), in either order,
is passed in a floating-point register and an integer register,
provided the floating-point real is no more than FLEN bits wide and
the integer is no more than XLEN bits wide. */
if (tag == DW_TAG_structure_type
&& flatten_aggregate_arg (&typedie, &arg0, &arg1))
return pass_by_flattened_arg (locp, size, &arg0, &arg1);
/* Aggregates larger than 2*XLEN bits are passed by reference. */
else if (size > 16)
return pass_by_ref (locp);
/* Aggregates whose total size is no more than XLEN bits are passed in
a register. Aggregates whose total size is no more than 2*XLEN bits
are passed in a pair of registers. */
else
return pass_in_gpr_lp64 (locp, size);
}
if (tag == DW_TAG_base_type
|| tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
{
if (dwarf_bytesize_aux (&typedie, &size) < 0)
{
if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
size = 8;
else
return -1;
}
Dwarf_Attribute attr_mem;
if (tag == DW_TAG_base_type)
{
Dwarf_Word encoding;
if (dwarf_formudata (dwarf_attr_integrate (&typedie, DW_AT_encoding,
&attr_mem),
&encoding) != 0)
return -1;
switch (encoding)
{
case DW_ATE_boolean:
case DW_ATE_signed:
case DW_ATE_unsigned:
case DW_ATE_unsigned_char:
case DW_ATE_signed_char:
/* Scalars that are at most XLEN bits wide are passed in a single
argument register. Scalars that are 2*XLEN bits wide are
passed in a pair of argument registers. Scalars wider than
2*XLEN are passed by reference; there are none for LP64D. */
return pass_in_gpr_lp64 (locp, size);
case DW_ATE_float:
/* A real floating-point argument is passed in a floating-point
argument register if it is no more than FLEN bits wide,
otherwise it is passed according to the integer calling
convention. */
switch (size)
{
case 4: /* single */