diff options
author | Roland McGrath <roland@redhat.com> | 2008-12-03 03:41:58 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2008-12-03 03:41:58 +0000 |
commit | a845f68bf43f90e0670ed6b33154f2aff98ad46b (patch) | |
tree | 3bc6809479ef0de95b106f0f8616ca8cb0c02cc2 /backends | |
parent | a4c9d281616090c46ffc4fc3234d64e915008e1a (diff) | |
download | elfutils-a845f68bf43f90e0670ed6b33154f2aff98ad46b.tar.gz |
src/
2008-12-02 Roland McGrath <roland@redhat.com>
* readelf.c (count_dwflmod, process_file): Don't presume encoding of
nonzero OFFSET argument to dwfl_getmodules.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/ChangeLog | 5 | ||||
-rw-r--r-- | backends/Makefile.am | 2 | ||||
-rw-r--r-- | backends/i386_corenote.c | 6 | ||||
-rw-r--r-- | backends/x86_64_corenote.c | 5 | ||||
-rw-r--r-- | backends/x86_corenote.c | 47 |
5 files changed, 60 insertions, 5 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index 5bf38a78..85609b15 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -5,6 +5,11 @@ 2008-08-01 Roland McGrath <roland@redhat.com> + * x86_corenote.c: New file. + * Makefile.am (noinst_HEADERS): Add it. + * i386_corenote.c: Include it, use EXTRA_NOTES_IOPERM in EXTRA_NOTES. + * x86_64_corenote.c: Likewise. + * linux-core-note.c (prstatus_items): Use 'B' instead of 'b' for sigpend and sighold. diff --git a/backends/Makefile.am b/backends/Makefile.am index ebf6b09e..5b552946 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -146,7 +146,7 @@ uninstall: uninstall-am done rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) -noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c +noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) CLEANFILES = *.gcno *.gcda \ diff --git a/backends/i386_corenote.c b/backends/i386_corenote.c index 02d8ec38..c371c4c3 100644 --- a/backends/i386_corenote.c +++ b/backends/i386_corenote.c @@ -103,9 +103,8 @@ static const Ebl_Register_Location prxfpreg_regs[] = #define EXTRA_NOTES \ EXTRA_REGSET (NT_PRFPXREG, 512, prxfpreg_regs) \ case NT_386_TLS: \ - return tls_info (descsz, regs_offset, nregloc, reglocs, nitems, items); - -#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ + return tls_info (descsz, regs_offset, nregloc, reglocs, nitems, items); \ + EXTRA_NOTES_IOPERM static const Ebl_Core_Item tls_items[] = { @@ -131,4 +130,5 @@ tls_info (GElf_Word descsz, GElf_Word *regs_offset, return 1; } +#include "x86_corenote.c" #include "linux-core-note.c" diff --git a/backends/x86_64_corenote.c b/backends/x86_64_corenote.c index c2bc72e9..552ac88b 100644 --- a/backends/x86_64_corenote.c +++ b/backends/x86_64_corenote.c @@ -1,5 +1,5 @@ /* x86-64 specific core note handling. - Copyright (C) 2005, 2007 Red Hat, Inc. + Copyright (C) 2005, 2007, 2008 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -103,4 +103,7 @@ static const Ebl_Register_Location fpregset_regs[] = }; #define FPREGSET_SIZE 512 +#define EXTRA_NOTES EXTRA_NOTES_IOPERM + +#include "x86_corenote.c" #include "linux-core-note.c" diff --git a/backends/x86_corenote.c b/backends/x86_corenote.c new file mode 100644 index 00000000..7d550676 --- /dev/null +++ b/backends/x86_corenote.c @@ -0,0 +1,47 @@ +/* x86-specific core note handling, pieces common to x86-64 and i386. + Copyright (C) 2005, 2008 Red Hat, Inc. + This file is part of Red Hat elfutils. + + Red Hat elfutils is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by the + Free Software Foundation; version 2 of the License. + + Red Hat 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 a copy of the GNU General Public License along + with Red Hat elfutils; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. + + Red Hat elfutils is an included package of the Open Invention Network. + An included package of the Open Invention Network is a package for which + Open Invention Network licensees cross-license their patents. No patent + license is granted, either expressly or impliedly, by designation as an + included package. Should you wish to participate in the Open Invention + Network licensing program, please visit www.openinventionnetwork.com + <http://www.openinventionnetwork.com>. */ + +#define EXTRA_NOTES_IOPERM \ + case NT_386_IOPERM: \ + return ioperm_info (descsz, regs_offset, nregloc, reglocs, nitems, items); + +static int +ioperm_info (GElf_Word descsz, GElf_Word *regs_offset, + size_t *nregloc, const Ebl_Register_Location **reglocs, + size_t *nitems, const Ebl_Core_Item **items) +{ + static const Ebl_Core_Item ioperm_item = + { .type = ELF_T_WORD, .format = 'b', .name = "ioperm" }; + + if (descsz % 4 != 0) + return 0; + + *regs_offset = 0; + *nregloc = 0; + *reglocs = NULL; + *nitems = 1; + *items = &ioperm_item; + return 1; +} |