1 /* BFD backend for Extended Tektronix Hex Format objects.
2 Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
4 Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
6 This file is part of BFD, the Binary File Descriptor library.
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
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 Tektronix Hex Format handling
28 Tek Hex records can hold symbols and data, but not
29 relocations. Their main application is communication with
30 devices like PROM programmers and ICE equipment.
32 It seems that the sections are descibed as being really big,
33 the example I have says that the text section is 0..ffffffff.
34 BFD would barf with this, many apps would try to alloc 4GB to
37 Tex Hex may contain many sections, but the data which comes in
38 has no tag saying which section it belongs to, so we create
39 one section for each block of data, called "blknnnn" which we
40 stick all the data into.
42 TekHex may come out of order and there is no header, so an
43 initial scan is required to discover the minimum and maximum
44 addresses used to create the vma and size of the sections we
46 We read in the data into pages of CHUNK_MASK+1 size and read
47 them out from that whenever we need to.
49 Any number of sections may be created for output, we save them
50 up and output them when it's time to close the bfd.
53 A TekHex record looks like:
55 %<block length><type><checksum><stuff><cr>
60 is the number of bytes in the record not including the % sign.
68 The data can come out of order, and may be discontigous. This is a
69 serial protocol, so big files are unlikely, so we keep a list of 8k chunks
75 #include "libiberty.h"
83 typedef struct tekhex_symbol_struct
87 struct tekhex_symbol_struct
*prev
;
91 static const char digs
[] = "0123456789ABCDEF";
93 static char sum_block
[256];
96 #define NIBBLE(x) hex_value(x)
97 #define HEX(buffer) ((NIBBLE((buffer)[0])<<4) + NIBBLE((buffer)[1]))
99 (d)[1] = digs[(x) & 0xf]; \
100 (d)[0] = digs[((x)>>4)&0xf];
101 #define ISHEX(x) hex_p(x)
103 static void tekhex_print_symbol
104 PARAMS ((bfd
*, PTR
, asymbol
*, bfd_print_symbol_type
));
105 static void tekhex_get_symbol_info
PARAMS ((bfd
*, asymbol
*, symbol_info
*));
106 static asymbol
*tekhex_make_empty_symbol
PARAMS ((bfd
*));
107 static int tekhex_sizeof_headers
PARAMS ((bfd
*, boolean
));
108 static boolean tekhex_write_object_contents
PARAMS ((bfd
*));
109 static void out
PARAMS ((bfd
*, char, char *, char *));
110 static void writesym
PARAMS ((char **, CONST
char *));
111 static void writevalue
PARAMS ((char **, bfd_vma
));
112 static boolean tekhex_set_section_contents
113 PARAMS ((bfd
*, sec_ptr
, PTR
, file_ptr
, bfd_size_type
));
114 static boolean tekhex_set_arch_mach
115 PARAMS ((bfd
*, enum bfd_architecture
, unsigned long));
116 static boolean tekhex_get_section_contents
117 PARAMS ((bfd
*, asection
*, PTR
, file_ptr
, bfd_size_type
));
118 static void move_section_contents
119 PARAMS ((bfd
*, asection
*, PTR
, file_ptr
, bfd_size_type
, boolean
));
120 static const bfd_target
*tekhex_object_p
PARAMS ((bfd
*));
121 static boolean tekhex_mkobject
PARAMS ((bfd
*));
122 static long tekhex_get_symtab_upper_bound
PARAMS ((bfd
*));
123 static long tekhex_get_symtab
PARAMS ((bfd
*, asymbol
**));
124 static void pass_over
PARAMS ((bfd
*, void (*)(bfd
*, char, char *)));
125 static void first_phase
PARAMS ((bfd
*, char, char *));
126 static void insert_byte
PARAMS ((bfd
*, int, bfd_vma
));
127 static struct data_struct
*find_chunk
PARAMS ((bfd
*, bfd_vma
));
128 static unsigned int getsym
PARAMS ((char *, char **));
132 %3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
133 %1B3709T_SEGMENT1108FFFFFFFF
134 %2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
135 %373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
136 %373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
137 %373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
138 %373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
139 %373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
140 %373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
141 %373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
142 %2734D9T_SEGMENT8Bvoid$t15$151035_main10
143 %2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
144 %2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
148 %3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
150 | || +------ 4 char integer 0x8000
151 | |+-------- checksum
152 | +--------- type 6 (data record)
153 +----------- length 3a chars
154 <---------------------- 3a (58 chars) ------------------->
156 %1B3709T_SEGMENT1108FFFFFFFF
157 ^ ^^ ^- 8 character integer 0xffffffff
158 | |+- 1 character integer 0
159 | +-- type 1 symbol (section definition)
160 +------------ 9 char symbol T_SEGMENT
162 %2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
163 %373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
164 %373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
165 %373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
166 %373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
167 %373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
168 %373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
169 %373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
170 %2734D9T_SEGMENT8Bvoid$t15$151035_main10
171 %2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
172 %2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
176 sac@thepub$ ./objdump -dx -m m68k f
178 f: file format tekhex
179 -----x--- 9/55728 -134219416 Sep 29 15:13 1995 f
180 architecture: UNKNOWN!, flags 0x00000010:
182 start address 0x00000000
183 SECTION 0 [D00000000] : size 00020000 vma 00000000 align 2**0
185 SECTION 1 [D00008000] : size 00002001 vma 00008000 align 2**0
187 SECTION 2 [T_SEGMENT] : size ffffffff vma 00000000 align 2**0
190 00000000 g T_SEGMENT gcc_compiled$
191 00000000 g T_SEGMENT hello$c
192 00000000 g T_SEGMENT int$t1$r1$$21474
193 00000000 g T_SEGMENT char$t2$r2$0$127
194 00000000 g T_SEGMENT long$int$t3$r1$$
195 00000000 g T_SEGMENT unsigned$int$t4$
196 00000000 g T_SEGMENT long$unsigned$in
197 00000000 g T_SEGMENT short$int$t6$r1$
198 00000000 g T_SEGMENT long$long$int$t7
199 00000000 g T_SEGMENT short$unsigned$i
200 00000000 g T_SEGMENT long$long$unsign
201 00000000 g T_SEGMENT signed$char$t10$
202 00000000 g T_SEGMENT unsigned$char$t1
203 00000000 g T_SEGMENT float$t12$r1$4$0
204 00000000 g T_SEGMENT double$t13$r1$8$
205 00000000 g T_SEGMENT long$double$t14$
206 00000000 g T_SEGMENT void$t15$15
207 00000000 g T_SEGMENT _main
208 00000000 g T_SEGMENT $
209 00000000 g T_SEGMENT $
210 00000000 g T_SEGMENT $
211 00000010 g T_SEGMENT $
212 00000000 g T_SEGMENT main$F1
213 fcffffff g T_SEGMENT i$1
214 00000000 g T_SEGMENT $
215 00000010 g T_SEGMENT $
218 RELOCATION RECORDS FOR [D00000000]: (none)
220 RELOCATION RECORDS FOR [D00008000]: (none)
222 RELOCATION RECORDS FOR [T_SEGMENT]: (none)
224 Disassembly of section D00000000:
226 00008000 ($+)7ff0 linkw fp,#-4
227 00008004 ($+)7ff4 nop
228 00008006 ($+)7ff6 movel #99,d0
229 00008008 ($+)7ff8 cmpl fp@(-4),d0
230 0000800c ($+)7ffc blts 00008014 ($+)8004
231 0000800e ($+)7ffe addql #1,fp@(-4)
232 00008012 ($+)8002 bras 00008006 ($+)7ff6
233 00008014 ($+)8004 unlk fp
234 00008016 ($+)8006 rts
243 static boolean inited
= false;
251 for (i
= 0; i
< 10; i
++)
253 sum_block
[i
+ '0'] = val
++;
255 for (i
= 'A'; i
<= 'Z'; i
++)
257 sum_block
[i
] = val
++;
259 sum_block
['$'] = val
++;
260 sum_block
['%'] = val
++;
261 sum_block
['.'] = val
++;
262 sum_block
['_'] = val
++;
263 for (i
= 'a'; i
<= 'z'; i
++)
265 sum_block
[i
] = val
++;
270 /* The maximum number of bytes on a line is FF */
271 #define MAXCHUNK 0xff
272 /* The number of bytes we fit onto a line on output */
275 /* We cannot output our tekhexords as we see them, we have to glue them
276 together, this is done in this structure : */
278 struct tekhex_data_list_struct
283 struct tekhex_data_list_struct
*next
;
286 typedef struct tekhex_data_list_struct tekhex_data_list_type
;
288 #define CHUNK_MASK 0x1fff
292 char chunk_data
[CHUNK_MASK
+ 1];
293 char chunk_init
[CHUNK_MASK
+ 1];
295 struct data_struct
*next
;
298 typedef struct tekhex_data_struct
300 tekhex_data_list_type
*head
;
302 struct tekhex_symbol_struct
*symbols
;
303 struct data_struct
*data
;
306 #define enda(x) (x->vma + x->size)
314 unsigned int len
= hex_value(*src
++);
320 value
= value
<< 4 | hex_value(*src
++);
333 unsigned int len
= hex_value(*src
++);
337 for (i
= 0; i
< len
; i
++)
344 static struct data_struct
*
345 find_chunk (abfd
, vma
)
349 struct data_struct
*d
= abfd
->tdata
.tekhex_data
->data
;
352 while (d
&& (d
->vma
) != vma
)
358 char *sname
= bfd_alloc (abfd
, 12);
360 /* No chunk for this address, so make one up */
361 d
= (struct data_struct
*)
362 bfd_alloc (abfd
, sizeof (struct data_struct
));
367 memset (d
->chunk_init
, 0, CHUNK_MASK
+ 1);
368 memset (d
->chunk_data
, 0, CHUNK_MASK
+ 1);
369 d
->next
= abfd
->tdata
.tekhex_data
->data
;
371 abfd
->tdata
.tekhex_data
->data
= d
;
377 insert_byte (abfd
, value
, addr
)
382 /* Find the chunk that this byte needs and put it in */
383 struct data_struct
*d
= find_chunk (abfd
, addr
);
385 d
->chunk_data
[addr
& CHUNK_MASK
] = value
;
386 d
->chunk_init
[addr
& CHUNK_MASK
] = 1;
389 /* The first pass is to find the names of all the sections, and see
390 how big the data is */
392 first_phase (abfd
, type
, src
)
397 asection
*section
= bfd_abs_section_ptr
;
399 char sym
[17]; /* A symbol can only be 16chars long */
404 /* Data record - read it and store it */
406 bfd_vma addr
= getvalue (&src
);
410 insert_byte (abfd
, HEX (src
), addr
);
418 /* Symbol record, read the segment */
419 len
= getsym (sym
, &src
);
420 section
= bfd_get_section_by_name (abfd
, sym
);
421 if (section
== (asection
*) NULL
)
423 char *n
= bfd_alloc (abfd
, len
+ 1);
427 memcpy (n
, sym
, len
+ 1);
428 section
= bfd_make_section (abfd
, n
);
434 case '1': /* section range */
436 section
->vma
= getvalue (&src
);
437 section
->_raw_size
= getvalue (&src
) - section
->vma
;
438 section
->flags
= SEC_HAS_CONTENTS
| SEC_LOAD
| SEC_ALLOC
;
447 /* Symbols, add to section */
449 tekhex_symbol_type
*new =
450 (tekhex_symbol_type
*) bfd_alloc (abfd
,
451 sizeof (tekhex_symbol_type
));
456 new->symbol
.the_bfd
= abfd
;
459 abfd
->flags
|= HAS_SYMS
;
460 new->prev
= abfd
->tdata
.tekhex_data
->symbols
;
461 abfd
->tdata
.tekhex_data
->symbols
= new;
462 len
= getsym (sym
, &src
);
463 new->symbol
.name
= bfd_alloc (abfd
, len
+ 1);
464 if (!new->symbol
.name
)
466 memcpy ((char *) (new->symbol
.name
), sym
, len
+ 1);
467 new->symbol
.section
= section
;
469 new->symbol
.flags
= (BSF_GLOBAL
| BSF_EXPORT
);
471 new->symbol
.flags
= BSF_LOCAL
;
472 new->symbol
.value
= getvalue (&src
) - section
->vma
;
479 /* Pass over an tekhex, calling one of the above functions on each
483 pass_over (abfd
, func
)
485 void (*func
) PARAMS ((bfd
*, char, char *));
487 unsigned int chars_on_line
;
490 /* To the front of the file */
491 if (bfd_seek (abfd
, (file_ptr
) 0, SEEK_SET
) != 0)
495 char buffer
[MAXCHUNK
];
500 eof
= (boolean
) (bfd_read (src
, 1, 1, abfd
) != 1);
501 while (*src
!= '%' && !eof
)
503 eof
= (boolean
) (bfd_read (src
, 1, 1, abfd
) != 1);
509 /* Fetch the type and the length and the checksum */
510 if (bfd_read (src
, 1, 5, abfd
) != 5)
511 abort (); /* FIXME */
515 if (!ISHEX (src
[0]) || !ISHEX (src
[1]))
518 chars_on_line
= HEX (src
) - 5; /* Already read five char */
520 if (bfd_read (src
, 1, chars_on_line
, abfd
) != chars_on_line
)
521 abort (); /* FIXME */
522 src
[chars_on_line
] = 0; /* put a null at the end */
524 func (abfd
, type
, src
);
530 tekhex_get_symtab (abfd
, table
)
534 tekhex_symbol_type
*p
= abfd
->tdata
.tekhex_data
->symbols
;
535 unsigned int c
= bfd_get_symcount (abfd
);
540 table
[--c
] = &(p
->symbol
);
544 return bfd_get_symcount (abfd
);
548 tekhex_get_symtab_upper_bound (abfd
)
551 return (abfd
->symcount
+ 1) * (sizeof (struct tekhex_asymbol_struct
*));
556 tekhex_mkobject (abfd
)
559 tdata_type
*tdata
= (tdata_type
*) bfd_alloc (abfd
, sizeof (tdata_type
));
563 abfd
->tdata
.tekhex_data
= tdata
;
565 tdata
->head
= (tekhex_data_list_type
*) NULL
;
566 tdata
->symbols
= (struct tekhex_symbol_struct
*) NULL
;
567 tdata
->data
= (struct data_struct
*) NULL
;
572 Return true if the file looks like it's in TekHex format. Just look
573 for a percent sign and some hex digits */
575 static const bfd_target
*
576 tekhex_object_p (abfd
)
583 if (bfd_seek (abfd
, (file_ptr
) 0, SEEK_SET
) != 0
584 || bfd_read (b
, 1, 4, abfd
) != 4)
587 if (b
[0] != '%' || !ISHEX (b
[1]) || !ISHEX (b
[2]) || !ISHEX (b
[3]))
588 return (const bfd_target
*) NULL
;
590 tekhex_mkobject (abfd
);
592 pass_over (abfd
, first_phase
);
597 move_section_contents (abfd
, section
, locationp
, offset
, count
, get
)
606 char *location
= (char *) locationp
;
607 bfd_vma prev_number
= 1; /* Nothing can have this as a high bit*/
608 struct data_struct
*d
= (struct data_struct
*) NULL
;
610 for (addr
= section
->vma
; count
!= 0; count
--, addr
++)
613 bfd_vma chunk_number
= addr
& ~CHUNK_MASK
; /* Get high bits of address */
614 bfd_vma low_bits
= addr
& CHUNK_MASK
;
616 if (chunk_number
!= prev_number
)
618 /* Different chunk, so move pointer */
619 d
= find_chunk (abfd
, chunk_number
);
624 if (d
->chunk_init
[low_bits
])
626 *location
= d
->chunk_data
[low_bits
];
635 d
->chunk_data
[low_bits
] = *location
;
636 d
->chunk_init
[low_bits
] = (*location
!= 0);
646 tekhex_get_section_contents (abfd
, section
, locationp
, offset
, count
)
653 if (section
->flags
& (SEC_LOAD
| SEC_ALLOC
))
655 move_section_contents (abfd
, section
, locationp
, offset
, count
, true);
663 tekhex_set_arch_mach (abfd
, arch
, machine
)
665 enum bfd_architecture arch
;
666 unsigned long machine
;
668 return bfd_default_set_arch_mach (abfd
, arch
, machine
);
671 /* we have to save up all the Tekhexords for a splurge before output,
675 tekhex_set_section_contents (abfd
, section
, locationp
, offset
, bytes_to_do
)
680 bfd_size_type bytes_to_do
;
683 if (abfd
->output_has_begun
== false)
685 /* The first time around, allocate enough sections to hold all the chunks */
686 asection
*s
= abfd
->sections
;
689 for (s
= abfd
->sections
; s
; s
= s
->next
)
691 if (s
->flags
& SEC_LOAD
)
693 for (vma
= s
->vma
& ~CHUNK_MASK
;
694 vma
< s
->vma
+ s
->_raw_size
;
696 find_chunk (abfd
, vma
);
701 if (section
->flags
& (SEC_LOAD
| SEC_ALLOC
))
703 move_section_contents (abfd
, section
, locationp
, offset
, bytes_to_do
, false);
712 writevalue (dst
, value
)
720 for (len
= 8, shift
= 28; shift
; shift
-= 4, len
--)
722 if ((value
>> shift
) & 0xf)
727 *p
++ = digs
[(value
>> shift
) & 0xf];
747 int len
= (sym
? strlen (sym
) : 0);
777 out (abfd
, type
, start
, end
)
789 TOHEX (front
+ 1, end
- start
+ 5);
792 for (s
= start
; s
< end
; s
++)
794 sum
+= sum_block
[(unsigned char) *s
];
797 sum
+= sum_block
[(unsigned char) front
[1]]; /* length */
798 sum
+= sum_block
[(unsigned char) front
[2]];
799 sum
+= sum_block
[(unsigned char) front
[3]]; /* type */
800 TOHEX (front
+ 4, sum
);
801 if (bfd_write (front
, 1, 6, abfd
) != 6)
804 wrlen
= end
- start
+ 1;
805 if (bfd_write (start
, 1, wrlen
, abfd
) != wrlen
)
810 tekhex_write_object_contents (abfd
)
817 struct data_struct
*d
;
821 /* And the raw data */
822 for (d
= abfd
->tdata
.tekhex_data
->data
;
823 d
!= (struct data_struct
*) NULL
;
831 /* Write it in blocks of 32 bytes */
833 for (addr
= 0; addr
< CHUNK_MASK
+ 1; addr
+= span
)
837 /* Check to see if necessary */
838 for (low
= 0; !need
&& low
< span
; low
++)
840 if (d
->chunk_init
[addr
+ low
])
847 writevalue (&dst
, addr
+ d
->vma
);
848 for (low
= 0; low
< span
; low
++)
850 TOHEX (dst
, d
->chunk_data
[addr
+ low
]);
853 out (abfd
, '6', buffer
, dst
);
857 /* write all the section headers for the sections */
858 for (s
= abfd
->sections
; s
!= (asection
*) NULL
; s
= s
->next
)
862 writesym (&dst
, s
->name
);
864 writevalue (&dst
, s
->vma
);
865 writevalue (&dst
, s
->vma
+ s
->_raw_size
);
866 out (abfd
, '3', buffer
, dst
);
869 /* And the symbols */
870 for (p
= abfd
->outsymbols
; *p
; p
++)
872 int section_code
= bfd_decode_symclass (*p
);
874 if (section_code
!= '?')
875 { /* do not include debug symbols */
879 writesym (&dst
, s
->section
->name
);
881 switch (section_code
)
907 bfd_set_error (bfd_error_wrong_format
);
911 writesym (&dst
, s
->name
);
912 writevalue (&dst
, s
->value
+ s
->section
->vma
);
913 out (abfd
, '3', buffer
, dst
);
917 /* And the terminator */
918 if (bfd_write ("%0781010\n", 1, 9, abfd
) != 9)
924 tekhex_sizeof_headers (abfd
, exec
)
933 tekhex_make_empty_symbol (abfd
)
936 tekhex_symbol_type
*new =
937 (tekhex_symbol_type
*) bfd_zalloc (abfd
, sizeof (struct tekhex_symbol_struct
));
941 new->symbol
.the_bfd
= abfd
;
942 new->prev
= (struct tekhex_symbol_struct
*) NULL
;
943 return &(new->symbol
);
947 tekhex_get_symbol_info (ignore_abfd
, symbol
, ret
)
952 bfd_symbol_info (symbol
, ret
);
956 tekhex_print_symbol (ignore_abfd
, filep
, symbol
, how
)
960 bfd_print_symbol_type how
;
962 FILE *file
= (FILE *) filep
;
966 case bfd_print_symbol_name
:
967 fprintf (file
, "%s", symbol
->name
);
969 case bfd_print_symbol_more
:
972 case bfd_print_symbol_all
:
974 CONST
char *section_name
= symbol
->section
->name
;
976 bfd_print_symbol_vandf ((PTR
) file
, symbol
);
978 fprintf (file
, " %-5s %s",
985 #define tekhex_close_and_cleanup _bfd_generic_close_and_cleanup
986 #define tekhex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
987 #define tekhex_new_section_hook _bfd_generic_new_section_hook
989 #define tekhex_bfd_is_local_label bfd_generic_is_local_label
990 #define tekhex_get_lineno _bfd_nosymbols_get_lineno
991 #define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
992 #define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
993 #define tekhex_read_minisymbols _bfd_generic_read_minisymbols
994 #define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
996 #define tekhex_bfd_get_relocated_section_contents \
997 bfd_generic_get_relocated_section_contents
998 #define tekhex_bfd_relax_section bfd_generic_relax_section
999 #define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
1000 #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
1001 #define tekhex_bfd_final_link _bfd_generic_final_link
1002 #define tekhex_bfd_link_split_section _bfd_generic_link_split_section
1004 #define tekhex_get_section_contents_in_window \
1005 _bfd_generic_get_section_contents_in_window
1007 const bfd_target tekhex_vec
=
1009 "tekhex", /* name */
1010 bfd_target_tekhex_flavour
,
1011 BFD_ENDIAN_UNKNOWN
, /* target byte order */
1012 BFD_ENDIAN_UNKNOWN
, /* target headers byte order */
1013 (EXEC_P
| /* object flags */
1014 HAS_SYMS
| HAS_LINENO
| HAS_DEBUG
| HAS_RELOC
| HAS_LOCALS
|
1016 (SEC_CODE
| SEC_DATA
| SEC_ROM
| SEC_HAS_CONTENTS
1017 | SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
1018 0, /* leading underscore */
1019 ' ', /* ar_pad_char */
1020 16, /* ar_max_namelen */
1021 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
1022 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
1023 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* data */
1024 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
1025 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
1026 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* hdrs */
1030 tekhex_object_p
, /* bfd_check_format */
1037 _bfd_generic_mkarchive
,
1040 { /* bfd_write_contents */
1042 tekhex_write_object_contents
,
1043 _bfd_write_archive_contents
,
1047 BFD_JUMP_TABLE_GENERIC (tekhex
),
1048 BFD_JUMP_TABLE_COPY (_bfd_generic
),
1049 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
1050 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive
),
1051 BFD_JUMP_TABLE_SYMBOLS (tekhex
),
1052 BFD_JUMP_TABLE_RELOCS (_bfd_norelocs
),
1053 BFD_JUMP_TABLE_WRITE (tekhex
),
1054 BFD_JUMP_TABLE_LINK (tekhex
),
1055 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),