Changeset 86 for trunk/src/binutils/bfd
- Timestamp:
- May 3, 2003, 11:45:43 PM (22 years ago)
- Location:
- trunk/src/binutils/bfd
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/binutils/bfd/acinclude.m4
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 4 4 case "${host}" in 5 5 changequote(,)dnl 6 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* )6 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-os2*) 7 7 changequote([,])dnl 8 8 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/aoutx.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 270 270 271 271 #define TABLE_SIZE(TABLE) (sizeof (TABLE)/sizeof (TABLE[0])) 272 273 #ifndef IS_STAB 274 # define IS_STAB(flags) ((flags) & N_STAB) 275 #endif 272 276 273 277 reloc_howto_type * … … 1376 1380 flagword visible; 1377 1381 1378 if ( (cache_ptr->type & N_STAB) != 01382 if (IS_STAB(cache_ptr->type) 1379 1383 || cache_ptr->type == N_FN) 1380 1384 { … … 1615 1619 cache_ptr->symbol.flags = BSF_WEAK; 1616 1620 break; 1621 1622 #ifdef EMX 1623 case N_IMP1 | N_EXT: 1624 cache_ptr->symbol.section = bfd_abs_section_ptr; 1625 cache_ptr->symbol.flags = BSF_EMX_IMPORT1; 1626 break; 1627 1628 case N_IMP2 | N_EXT: 1629 cache_ptr->symbol.section = bfd_abs_section_ptr; 1630 cache_ptr->symbol.flags = BSF_EMX_IMPORT2; 1631 break; 1632 #endif /* EMX */ 1617 1633 } 1618 1634 … … 3149 3165 below. */ 3150 3166 if (((type & N_EXT) == 0 3151 || (type & N_STAB) != 03167 || IS_STAB(type) 3152 3168 || type == N_FN) 3153 3169 && type != N_WEAKA … … 3180 3196 || type == (N_BSS | N_EXT) 3181 3197 || type == (N_ABS | N_EXT) 3182 || type == (N_INDR | N_EXT)) 3198 || type == (N_INDR | N_EXT) 3199 #if defined (EMX) 3200 || type == (N_IMP1 | N_EXT) 3201 #endif 3202 ) 3183 3203 { 3184 3204 /* This object file defines this symbol. We must link it … … 3353 3373 3354 3374 /* Ignore debugging symbols. */ 3355 if ( (type & N_STAB) != 0)3375 if (IS_STAB(type)) 3356 3376 continue; 3357 3377 … … 3473 3493 flags = BSF_WEAK; 3474 3494 break; 3495 #ifdef EMX 3496 case N_IMP1 | N_EXT: 3497 section = bfd_abs_section_ptr; 3498 flags = BSF_EMX_IMPORT1; 3499 value = -1; /* -1 in *ABS* means external imported symbol */ 3500 break; 3501 case N_IMP2 | N_EXT: 3502 section = bfd_abs_section_ptr; 3503 flags = BSF_EMX_IMPORT2; 3504 break; 3505 #endif /* EMX */ 3475 3506 } 3476 3507 … … 4189 4220 break; 4190 4221 case strip_debugger: 4191 if ( (type & N_STAB) != 0)4222 if (IS_STAB(type)) 4192 4223 skip = true; 4193 4224 break; … … 4237 4268 symsec = NULL; 4238 4269 } 4239 else if ((type & N_STAB) != 0) 4270 else if ((type == (N_IMP1 | N_EXT)) 4271 || (type == (N_IMP2 | N_EXT))) 4272 symsec = bfd_abs_section_ptr; 4273 else if (IS_STAB(type)) 4240 4274 { 4241 4275 val = GET_WORD (input_bfd, sym->e_value); … … 4354 4388 break; 4355 4389 case discard_l: 4356 if ( (type & N_STAB) == 04390 if (!IS_STAB(type) 4357 4391 && bfd_is_local_label_name (input_bfd, name)) 4358 4392 skip = true; … … 4864 4898 h = sym_hashes[r_index]; 4865 4899 if (h != (struct aout_link_hash_entry *) NULL 4900 #ifdef EMX 4901 /* Don't touch imported symbols */ 4902 && (!bfd_is_abs_section (h->root.u.def.section) 4903 || (h->root.u.def.value != -1)) 4904 #endif 4866 4905 && (h->root.type == bfd_link_hash_defined 4867 4906 || h->root.type == bfd_link_hash_defweak)) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/archive.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 1914 1914 flags & BSF_WEAK || 1915 1915 flags & BSF_INDIRECT || 1916 #ifdef EMX 1917 flags & BSF_EMX_IMPORT1 || 1918 #endif /* EMX */ 1916 1919 bfd_is_com_section (sec)) 1917 1920 && ! bfd_is_und_section (sec)) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/bfd-in2.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 2803 2803 #define BSF_DEBUGGING_RELOC 0x20000 2804 2804 2805 /* Symbol is an emx import reference. */ 2806 #define BSF_EMX_IMPORT1 0x20000000 2807 2808 /* Symbol is an emx import definition. */ 2809 #define BSF_EMX_IMPORT2 0x40000000 2810 2805 2811 flagword flags; 2806 2812 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/config.bfd
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 915 915 targ_selvecs=ieee_vec 916 916 ;; 917 918 i[3456]86-*-os2*) 919 targ_defvec=i386aout_emx_vec 920 targ_selvecs=i386aout_emx_vec 921 targ_underscore=yes 922 ;; 923 917 924 # END OF targmatch.h 918 925 *) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/configure.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 219 219 i[3456]86-*-isc*) COREFILE=trad-core.lo ;; 220 220 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;; 221 changequote([,])dnl 221 i[3456]86-*-os2*) 222 changequote([,])dnl 223 COREFILE=trad-core.lo 224 AC_DEFINE(TRAD_HEADER,"hosts/i386emx.h") 225 ;; 222 226 i860-*-mach3* | i860-*-osf1*) 223 227 COREFILE=trad-core.lo … … 589 593 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; 590 594 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; 595 i386aout_emx_vec) tb="$tb i386aoutemx.lo aout32.lo " ;; 591 596 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; 592 597 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/host-aout.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 36 36 37 37 in the ./hosts/h-systemname.h file. */ 38 39 #ifdef TRAD_HEADER40 #include TRAD_HEADER41 #endif42 38 43 39 #ifdef HOST_PAGE_SIZE -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/libaout.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 186 186 { 187 187 long a_info; /* Magic number and flags, packed */ 188 #if defined (__EMX__) 189 long emx_add; 190 #endif 188 191 bfd_vma a_text; /* length of text, in bytes */ 189 192 bfd_vma a_data; /* length of data, in bytes */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/syms.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 289 289 .#define BSF_DEBUGGING_RELOC 0x20000 290 290 . 291 . {* Symbol is an emx import reference. *} 292 .#define BSF_EMX_IMPORT1 0x20000000 293 . 294 . {* Symbol is an emx import definition. *} 295 .#define BSF_EMX_IMPORT2 0x40000000 296 . 291 297 . flagword flags; 292 298 . … … 459 465 ? (type & BSF_GLOBAL) ? '!' : 'l' 460 466 : (type & BSF_GLOBAL) ? 'g' : ' '), 467 #ifdef EMX 468 (type & BSF_EMX_IMPORT1) ? 'e' : 469 (type & BSF_EMX_IMPORT2) ? 'E' : 470 #endif /* EMX */ 461 471 (type & BSF_WEAK) ? 'w' : ' ', 462 472 (type & BSF_CONSTRUCTOR) ? 'C' : ' ', … … 602 612 return 'W'; 603 613 } 614 #ifdef EMX 615 if (symbol->flags & BSF_EMX_IMPORT1) 616 return 'e'; 617 if (symbol->flags & BSF_EMX_IMPORT2) 618 return 'E'; 619 #endif /* EMX */ 604 620 if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL))) 605 621 return '?'; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/sysdep.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 26 26 27 27 #include "config.h" 28 29 #ifdef TRAD_HEADER 30 #include TRAD_HEADER 31 #endif 28 32 29 33 #ifdef HAVE_STDDEF_H -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/targets.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 586 586 extern const bfd_target i386bsd_vec; 587 587 extern const bfd_target i386coff_vec; 588 extern const bfd_target i386aout_emx_vec; 588 589 extern const bfd_target i386dynix_vec; 589 590 extern const bfd_target i386freebsd_vec; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/binutils/bfd/trad-core.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r85 r86 44 44 #include <sys/user.h> /* After a.out.h */ 45 45 46 #ifdef TRAD_HEADER47 #include TRAD_HEADER48 #endif49 50 46 struct trad_core_struct 51 47 { 52 48 asection *data_section; 49 #ifdef __EMX__ 50 asection *heap_section; 51 #endif /* __EMX__ */ 53 52 asection *stack_section; 54 53 asection *reg_section; … … 58 57 #define core_upage(bfd) (&((bfd)->tdata.trad_core_data->u)) 59 58 #define core_datasec(bfd) ((bfd)->tdata.trad_core_data->data_section) 59 #ifdef __EMX__ 60 #define core_heapsec(bfd) ((bfd)->tdata.trad_core_data->heap_section) 61 #endif /* __EMX__ */ 60 62 #define core_stacksec(bfd) ((bfd)->tdata.trad_core_data->stack_section) 61 63 #define core_regsec(bfd) ((bfd)->tdata.trad_core_data->reg_section) … … 97 99 98 100 /* Sanity check perhaps??? */ 101 #ifdef __EMX__ 102 if (u.u_magic != UMAGIC) 103 return 0; 104 #else /* !__EMX__ */ 99 105 if (u.u_dsize > 0x1000000) /* Remember, it's in pages... */ 100 106 { … … 145 151 #endif 146 152 } 153 #endif /* !__EMX__ */ 147 154 148 155 /* OK, we believe you. You're a core file (sure, sure). */ … … 171 178 if (core_regsec (abfd) == NULL) 172 179 return NULL; 180 #ifdef EMX 181 core_heapsec (abfd) = (asection *) bfd_zmalloc (sizeof (asection)); 182 if (core_heapsec (abfd) == NULL) 183 return NULL; 184 #endif /* EMX */ 173 185 174 186 core_stacksec (abfd)->name = ".stack"; 175 187 core_datasec (abfd)->name = ".data"; 188 #ifdef EMX 189 core_heapsec (abfd)->name = ".heap"; 190 #endif /* EMX */ 176 191 core_regsec (abfd)->name = ".reg"; 177 192 … … 179 194 core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; 180 195 core_regsec (abfd)->flags = SEC_HAS_CONTENTS; 181 196 #ifdef EMX 197 core_heapsec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; 198 #endif /* EMX */ 199 200 #ifdef EMX 201 core_datasec (abfd)->_raw_size = u.u_data_end - u.u_data_base; 202 core_heapsec (abfd)->_raw_size = u.u_heap_brk - u.u_heap_base; 203 core_stacksec (abfd)->_raw_size = u.u_stack_end - u.u_stack_low; 204 core_regsec (abfd)->_raw_size = sizeof (struct user); 205 #else /* not EMX */ 182 206 core_datasec (abfd)->_raw_size = NBPG * u.u_dsize 183 207 #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE … … 187 211 core_stacksec (abfd)->_raw_size = NBPG * u.u_ssize; 188 212 core_regsec (abfd)->_raw_size = NBPG * UPAGES; /* Larger than sizeof struct u */ 213 #endif /* not EMX */ 189 214 190 215 /* What a hack... we'd like to steal it from the exec file, 191 216 since the upage does not seem to provide it. FIXME. */ 217 #ifdef EMX 218 core_datasec (abfd)->vma = u.u_data_base; 219 core_heapsec (abfd)->vma = u.u_heap_base; 220 core_stacksec (abfd)->vma = u.u_stack_low; 221 #else /* not EMX */ 192 222 #ifdef HOST_DATA_START_ADDR 193 223 core_datasec (abfd)->vma = HOST_DATA_START_ADDR; … … 201 231 core_stacksec (abfd)->vma = HOST_STACK_END_ADDR - (NBPG * u.u_ssize); 202 232 #endif 233 #endif /* not EMX */ 203 234 204 235 /* This is tricky. As the "register section", we give them the entire … … 218 249 core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0; 219 250 251 #ifdef EMX 252 core_datasec (abfd)->filepos = u.u_data_off; 253 core_heapsec (abfd)->filepos = u.u_heap_off; 254 core_stacksec (abfd)->filepos = u.u_stack_off; 255 #else /* not EMX */ 220 256 core_datasec (abfd)->filepos = NBPG * UPAGES; 221 257 core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize … … 224 260 #endif 225 261 ; 262 #endif /* not EMX */ 263 226 264 core_regsec (abfd)->filepos = 0; /* Register segment is the upage */ 227 265 … … 229 267 core_stacksec (abfd)->alignment_power = 2; 230 268 core_datasec (abfd)->alignment_power = 2; 269 #ifdef EMX 270 core_heapsec (abfd)->alignment_power = 2; 271 #endif /* EMX */ 231 272 core_regsec (abfd)->alignment_power = 2; 232 273 233 274 abfd->sections = core_stacksec (abfd); 234 275 core_stacksec (abfd)->next = core_datasec (abfd); 276 #ifdef EMX 277 core_datasec (abfd)->next = core_heapsec (abfd); 278 core_heapsec (abfd)->next = core_regsec (abfd); 279 abfd->section_count = 4; 280 #else /* not EMX */ 235 281 core_datasec (abfd)->next = core_regsec (abfd); 236 282 abfd->section_count = 3; 283 #endif /* not EMX */ 237 284 238 285 return abfd->xvec; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.