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

Contents of /src/lisp/elf.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (hide annotations)
Wed Dec 22 20:17:24 2010 UTC (3 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, HEAD
Changes since 1.15: +2 -2 lines
File MIME type: text/plain
Update conditionals so we choose the correct compiler for Solaris/x86
(where we only support Sun C now).
1 rtoy 1.16 /* $Id: elf.h,v 1.16 2010/12/22 20:17:24 rtoy Exp $ */
2 fgilham 1.3
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 rtoy 1.12 /*
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 fgilham 1.2 #if !defined(_ELF_H_INCLUDED_)
13    
14     #define _ELF_H_INCLUDED_
15    
16 rtoy 1.13 /*
17 rtoy 1.15 * Script to use for linking everything to make an executable.
18 rtoy 1.13 */
19 rtoy 1.15 #define LINKER_SCRIPT "linker.sh"
20 fgilham 1.2
21 rtoy 1.7 #if defined(SOLARIS)
22 fgilham 1.6 #include <sys/elf.h>
23 rtoy 1.12 #elif defined(DARWIN)
24     #include <mach-o/loader.h>
25 fgilham 1.6 #else
26     #include <elf.h>
27     #endif
28    
29 rtoy 1.12
30 rtoy 1.8 /*
31     * We need to know which compiler was used to build lisp. I think gcc
32     * is used everywhere, except on Solaris/sparc, where we can use
33     * either gcc or Sun C.
34     */
35 rtoy 1.16 #if defined(__SUNPRO_C)
36 rtoy 1.8 #define C_COMPILER "cc"
37     #else
38     #define C_COMPILER "gcc"
39     #endif
40    
41 rtoy 1.12 int write_space_object(const char *, int, os_vm_address_t, os_vm_address_t);
42     void obj_cleanup(const char *);
43     int obj_run_linker(long, char *);
44 fgilham 1.2
45 agoncharov 1.10 void map_core_sections(const char *);
46 fgilham 1.2
47 rtoy 1.12 #if defined(DARWIN)
48     #elif defined(SOLARIS) || defined(linux) || defined(__NetBSD__)
49 fgilham 1.6 typedef Elf32_Ehdr Elf_Ehdr;
50     typedef Elf32_Shdr Elf_Shdr;
51     typedef Elf32_Word Elf_Word;
52     typedef Elf32_Addr Elf_Addr;
53     #endif
54    
55 fgilham 1.2 #endif

  ViewVC Help
Powered by ViewVC 1.1.5