/[cmucl]/src/lisp/elf.h
ViewVC logotype

Contents of /src/lisp/elf.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations)
Sat Jul 31 00:03:23 2010 UTC (3 years, 8 months ago) by rtoy
Branch: MAIN
Changes since 1.11: +15 -6 lines
File MIME type: text/plain
Some cleanup of the names of main functions for creating executable
images.

lisp/elf.c:
o Change write_elf_object, elf_cleanup, and elf_run_linker to
  write_space_object, obj_cleanup, and obj_run_linker.

lisp/elf.h:
o Update so that this can used for both elf and mach-o.  Not great,
  but I don't want to rename this file.

lisp/mach-o.c:
o Include elf.h
o Remove items that are defined in elf.h.
o Change function names from elf to mach_o.

lisp/save.c:
o Update names to new ones.
1 /* $Id: elf.h,v 1.12 2010/07/31 00:03:23 rtoy Exp $ */
2
3 /* This code was written by Fred Gilham and has been placed in the public domain. It is
4 provided "AS-IS" and without warranty of any kind.
5 */
6
7 /*
8 * Despite the fact that this file is named elf.h, it's really the
9 * interface to both elf and mach-o support. I (rtoy) was too lazy to
10 * change the name to something more descriptive.
11 */
12 #if !defined(_ELF_H_INCLUDED_)
13
14 #define _ELF_H_INCLUDED_
15
16 #if defined(__linux__) || defined(DARWIN)
17 #define LINKER_SCRIPT "linker-x86.sh"
18 #else
19 #define LINKER_SCRIPT "linker.sh"
20 #endif
21
22 #if defined(SOLARIS)
23 #include <sys/elf.h>
24 #elif defined(DARWIN)
25 #include <mach-o/loader.h>
26 #else
27 #include <elf.h>
28 #endif
29
30
31 /*
32 * We need to know which compiler was used to build lisp. I think gcc
33 * is used everywhere, except on Solaris/sparc, where we can use
34 * either gcc or Sun C.
35 */
36 #if defined(__SUNPRO_C) && defined(__sparc)
37 #define C_COMPILER "cc"
38 #else
39 #define C_COMPILER "gcc"
40 #endif
41
42 int write_space_object(const char *, int, os_vm_address_t, os_vm_address_t);
43 void obj_cleanup(const char *);
44 int obj_run_linker(long, char *);
45
46 void map_core_sections(const char *);
47
48 #if defined(DARWIN)
49 #elif defined(SOLARIS) || defined(linux) || defined(__NetBSD__)
50 typedef Elf32_Ehdr Elf_Ehdr;
51 typedef Elf32_Shdr Elf_Shdr;
52 typedef Elf32_Word Elf_Word;
53 typedef Elf32_Addr Elf_Addr;
54 #endif
55
56 #endif

  ViewVC Help
Powered by ViewVC 1.1.5