资源简介
GNU binutils是一组二进制工具集。包括:addr2line ar gprof nm objcopy objdump ranlib size strings strip
代码片段和文件信息
/* BFD back-end for AIX on PS/2 core files.
This was based on trad-core.c which was written by John Gilmore of
Cygnus Support.
Copyright (C) 1988-2014 Free Software Foundation Inc.
Written by Minh Tran-Le .
Converted to back end form by Ian Lance Taylor .
This file is part of BFD the Binary File Descriptor library.
This program 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; either version 3 of the License or
(at your option) any later version.
This program 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 this program; if not write to the Free Software
Foundation Inc. 51 Franklin Street - Fifth Floor Boston
MA 02110-1301 USA. */
#include “sysdep.h“
#include “bfd.h“
#include “libbfd.h“
#include “coff/i386.h“
#include “coff/internal.h“
#include “libcoff.h“
#include
#if defined (_AIX) && defined (_I386)
#define NOCHECKS /* This is for coredump.h. */
#define _h_USER /* Avoid including user.h from coredump.h. */
#include
#include
#endif /* _AIX && _I386 */
/* Maybe this could work on some other i386 but I have not tried it
* mtranle@paris - Tue Sep 24 12:49:35 1991
*/
#ifndef COR_MAGIC
# define COR_MAGIC “core“
#endif
/* Need this cast because ptr is really void *. */
#define core_hdr(bfd) \
(((bfd->tdata.trad_core_data))->hdr)
#define core_section(bfdn) \
(((bfd)->tdata.trad_core_data)->sections[n])
#define core_regsec(bfd) \
(((bfd)->tdata.trad_core_data)->reg_section)
#define core_reg2sec(bfd) \
(((bfd)->tdata.trad_core_data)->reg2_section)
/* These are stored in the bfd‘s tdata. */
struct trad_core_struct
{
struct corehdr *hdr; /* core file header */
asection *reg_section;
asection *reg2_section;
asection *sections[MAX_CORE_SEGS];
};
static const bfd_target *
aix386_core_file_p (bfd *abfd)
{
int i n;
unsigned char longbuf[4]; /* Raw bytes of various header fields */
bfd_size_type core_size = sizeof (struct corehdr);
bfd_size_type amt;
struct corehdr *core;
struct mergem
{
struct trad_core_struct coredata;
struct corehdr internal_core;
} *mergem;
flagword flags;
amt = sizeof (longbuf);
if (bfd_bread (longbuf amt abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return 0;
}
if (strncmp (longbuf COR_MAGIC 4))
return 0;
if (bfd_seek (abfd (file_ptr) 0 0) != 0)
return 0;
amt = sizeof (struct mergem);
mergem = (struct mergem *) bfd_zalloc (abfd amt);
if (mergem == NULL)
re
- 上一篇:基于AT89C51的温度报警器
- 下一篇:keil4 for C51完美破解版
相关资源
- BPF Performance Tools - Brendan Gregg.rar
- 基于Arcsoft2.0 linux版+opencv
- unix-linux编程实践教程.pdf
- 鸟叔linux 基础篇
- 基于Qt电子词典的设计与实现
- 鸟哥的Linux私房菜-基础学习篇(第四
- apache-tomcat-6.0.53.tar.gz&&apache;-tomcat-6.
- Linux设备驱动开发详解PDF版
- linux 课件 linux全套学习资料
- 鸟哥的Linux私房菜-基础学习篇(第四
- 《Practical Linux Security Cookbook 》 《li
- 鸟哥私房菜-服务器篇
- 华中科技大学操作系统课程设计代码
- Kali Linux实用指南(英文原版)
- 飞思卡尔 I.MX6 Linux环境搭建中文手册
- 《鸟哥的Linux私房菜-基础篇》第四版
- 鸟哥的Linux私房菜-基础学习篇[第四版
- LinuxCentOS6.5离线安装gcc
- 在linuxapp上实现贪吃蛇.rar
- Linux命令行与shell脚本编程大全.第3版
- LINUX+SHELL脚本攻略(中文版带书签)
- 鸟哥的Linux私房菜基础篇第三版(全书
- Fundamentals of Linux (2018)
- 华清远见内部高清文档资料
- 鸟哥的Linux私房菜-基础篇-第四版-简体
- Linux c编程一站式学习中文版
- 64位操作系统的设计与实现
- rvct22 for linux_x86
- SecureCRSecureFXP-v7.0.0
- 基于51单片机GSM模块短信的家庭火灾报
评论
共有 条评论