OLD | NEW |
1 /* BFD back-end for Apple M68K COFF A/UX 3.x files. | 1 /* BFD back-end for Apple M68K COFF A/UX 3.x files. |
2 Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008, 2011 | 2 Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008, 2011, 2012 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 Written by Richard Henderson <rth@tamu.edu>. | 4 Written by Richard Henderson <rth@tamu.edu>. |
5 | 5 |
6 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
(...skipping 22 matching lines...) Expand all Loading... |
35 /* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */ | 35 /* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */ |
36 #define BSS_NOLOAD_IS_SHARED_LIBRARY | 36 #define BSS_NOLOAD_IS_SHARED_LIBRARY |
37 | 37 |
38 #define STATIC_RELOCS | 38 #define STATIC_RELOCS |
39 | 39 |
40 #define COFF_COMMON_ADDEND | 40 #define COFF_COMMON_ADDEND |
41 | 41 |
42 #include "sysdep.h" | 42 #include "sysdep.h" |
43 #include "bfd.h" | 43 #include "bfd.h" |
44 | 44 |
45 static bfd_boolean coff_m68k_aux_link_add_one_symbol | |
46 PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, | |
47 asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean, | |
48 struct bfd_link_hash_entry **)); | |
49 | |
50 #define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol | 45 #define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol |
| 46 static bfd_boolean |
| 47 coff_m68k_aux_link_add_one_symbol |
| 48 (struct bfd_link_info *, bfd *, const char *, flagword, asection *, |
| 49 bfd_vma, const char *, bfd_boolean, bfd_boolean, |
| 50 struct bfd_link_hash_entry **); |
51 | 51 |
52 #ifndef bfd_pe_print_pdata | 52 #ifndef bfd_pe_print_pdata |
53 #define bfd_pe_print_pdata NULL | 53 #define bfd_pe_print_pdata NULL |
54 #endif | 54 #endif |
55 | 55 |
56 #include "coff/aux-coff.h" /* override coff/internal.h and coff/m68k.h */ | 56 #include "coff/aux-coff.h" /* override coff/internal.h and coff/m68k.h */ |
57 #include "coff-m68k.c" | 57 #include "coff-m68k.c" |
58 | 58 |
59 /* We need non-absolute symbols to override absolute symbols. This | 59 /* We need non-absolute symbols to override absolute symbols. This |
60 mirrors Apple's "solution" to let a static library symbol override | 60 mirrors Apple's "solution" to let a static library symbol override |
61 a shared library symbol. On the whole not a good thing, given how | 61 a shared library symbol. On the whole not a good thing, given how |
62 shared libraries work here, but can work if you are careful with | 62 shared libraries work here, but can work if you are careful with |
63 what you include in the shared object. */ | 63 what you include in the shared object. */ |
64 | 64 |
65 static bfd_boolean | 65 static bfd_boolean |
66 coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value, | 66 coff_m68k_aux_link_add_one_symbol (struct bfd_link_info *info, |
67 » » » » string, copy, collect, hashp) | 67 » » » » bfd *abfd, |
68 struct bfd_link_info *info; | 68 » » » » const char *name, |
69 bfd *abfd; | 69 » » » » flagword flags, |
70 const char *name; | 70 » » » » asection *section, |
71 flagword flags; | 71 » » » » bfd_vma value, |
72 asection *section; | 72 » » » » const char *string, |
73 bfd_vma value; | 73 » » » » bfd_boolean copy, |
74 const char *string; | 74 » » » » bfd_boolean collect, |
75 bfd_boolean copy; | 75 » » » » struct bfd_link_hash_entry **hashp) |
76 bfd_boolean collect; | |
77 struct bfd_link_hash_entry **hashp; | |
78 { | 76 { |
79 struct bfd_link_hash_entry *h; | 77 struct bfd_link_hash_entry *h; |
80 | 78 |
81 if ((flags & (BSF_WARNING | BSF_CONSTRUCTOR | BSF_WEAK)) == 0 && | 79 if ((flags & (BSF_WARNING | BSF_CONSTRUCTOR | BSF_WEAK)) == 0 && |
82 !bfd_is_und_section (section) && | 80 !bfd_is_und_section (section) && |
83 !bfd_is_com_section (section)) | 81 !bfd_is_com_section (section)) |
84 { | 82 { |
85 /* The new symbol is a definition or an indirect definition */ | 83 /* The new symbol is a definition or an indirect definition */ |
86 | 84 |
87 /* This bit copied from linker.c */ | 85 /* This bit copied from linker.c */ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 else if (bfd_is_abs_section (section) && !bfd_is_abs_section (msec)) | 131 else if (bfd_is_abs_section (section) && !bfd_is_abs_section (msec)) |
134 return TRUE; | 132 return TRUE; |
135 } | 133 } |
136 } | 134 } |
137 | 135 |
138 /* If we didn't exit early, finish processing in the generic routine */ | 136 /* If we didn't exit early, finish processing in the generic routine */ |
139 return _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, | 137 return _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, |
140 value, string, copy, collect, | 138 value, string, copy, collect, |
141 hashp); | 139 hashp); |
142 } | 140 } |
OLD | NEW |