raw_object.cc (8232:b28d06a175be) raw_object.cc (10880:61a56f76222b)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 20 unchanged lines hidden (view full) ---

29 */
30
31#include "base/loader/raw_object.hh"
32#include "base/loader/symtab.hh"
33#include "base/trace.hh"
34#include "debug/Loader.hh"
35
36ObjectFile *
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 20 unchanged lines hidden (view full) ---

29 */
30
31#include "base/loader/raw_object.hh"
32#include "base/loader/symtab.hh"
33#include "base/trace.hh"
34#include "debug/Loader.hh"
35
36ObjectFile *
37RawObject::tryFile(const std::string &fname, int fd, size_t len, uint8_t *data)
37RawObject::tryFile(const std::string &fname, size_t len, uint8_t *data)
38{
38{
39 return new RawObject(fname, fd, len, data, ObjectFile::UnknownArch,
39 return new RawObject(fname, len, data, ObjectFile::UnknownArch,
40 ObjectFile::UnknownOpSys);
41}
42
40 ObjectFile::UnknownOpSys);
41}
42
43RawObject::RawObject(const std::string &_filename, int _fd, size_t _len,
43RawObject::RawObject(const std::string &_filename, size_t _len,
44 uint8_t *_data, Arch _arch, OpSys _opSys)
44 uint8_t *_data, Arch _arch, OpSys _opSys)
45 : ObjectFile(_filename, _fd, _len, _data, _arch, _opSys)
45 : ObjectFile(_filename, _len, _data, _arch, _opSys)
46{
47 text.baseAddr = 0;
48 text.size = len;
49 text.fileImage = fileData;
50
51 data.baseAddr = 0;
52 data.size = 0;
53 data.fileImage = NULL;

--- 29 unchanged lines hidden ---
46{
47 text.baseAddr = 0;
48 text.size = len;
49 text.fileImage = fileData;
50
51 data.baseAddr = 0;
52 data.size = 0;
53 data.fileImage = NULL;

--- 29 unchanged lines hidden ---