1 /* Hitachi SH specific support for 32-bit Linux
2 Copyright 2000 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 #define TARGET_BIG_SYM bfd_elf32_shblin_vec
21 #define TARGET_BIG_NAME "elf32-shbig-linux"
22 #define TARGET_LITTLE_SYM bfd_elf32_shlin_vec
23 #define TARGET_LITTLE_NAME "elf32-sh-linux"
24 #define ELF_ARCH bfd_arch_sh
25 #define ELF_MACHINE_CODE EM_SH
26 #define ELF_MAXPAGESIZE 0x10000
27 #define elf_symbol_leading_char 0
31 #include "elf/internal.h"
34 /* Support for core dump NOTE sections */
36 elf32_shlin_grok_prstatus (abfd
, note
)
38 Elf_Internal_Note
*note
;
48 case 168: /* Linux/SH */
50 elf_tdata (abfd
)->core_signal
= bfd_get_16 (abfd
, note
->descdata
+ 12);
53 elf_tdata (abfd
)->core_pid
= bfd_get_32 (abfd
, note
->descdata
+ 24);
62 /* Make a ".reg/999" section. */
63 return _bfd_elfcore_make_pseudosection (abfd
, ".reg",
64 raw_size
, note
->descpos
+ offset
);
68 elf32_shlin_grok_psinfo (abfd
, note
)
70 Elf_Internal_Note
*note
;
77 case 124: /* Linux/SH elf_prpsinfo */
78 elf_tdata (abfd
)->core_program
79 = _bfd_elfcore_strndup (abfd
, note
->descdata
+ 28, 16);
80 elf_tdata (abfd
)->core_command
81 = _bfd_elfcore_strndup (abfd
, note
->descdata
+ 44, 80);
84 /* Note that for some reason, a spurious space is tacked
85 onto the end of the args in some (at least one anyway)
86 implementations, so strip it off if it exists. */
89 char *command
= elf_tdata (abfd
)->core_command
;
90 int n
= strlen (command
);
92 if (0 < n
&& command
[n
- 1] == ' ')
93 command
[n
- 1] = '\0';
100 #define elf_backend_grok_prstatus elf32_shlin_grok_prstatus
101 #define elf_backend_grok_psinfo elf32_shlin_grok_psinfo
105 #include "elf32-sh.c"
This page took 0.032814 seconds and 4 git commands to generate.