/[gcl]/gcl/binutils/bfd/vms-tir.c
ViewVC logotype

Diff of /gcl/binutils/bfd/vms-tir.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:35:50 2002 UTC revision 1.2 by camm, Fri Sep 9 23:32:15 2005 UTC
# Line 1  Line 1 
1  /* vms-tir.c -- BFD back-end for VAX (openVMS/VAX) and  /* vms-tir.c -- BFD back-end for VAX (openVMS/VAX) and
2     EVAX (openVMS/Alpha) files.     EVAX (openVMS/Alpha) files.
3     Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002     Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
4     Free Software Foundation, Inc.     Free Software Foundation, Inc.
5    
6     TIR record handling functions     TIR record handling functions
# Line 41  Line 41 
41    
42  #include "vms.h"  #include "vms.h"
43    
44  static void image_set_ptr PARAMS ((bfd *abfd, int psect, uquad offset));  static void image_set_ptr
45  static void image_inc_ptr PARAMS ((bfd *abfd, uquad offset));    PARAMS ((bfd *abfd, int psect, uquad offset));
46  static void image_dump PARAMS ((bfd *abfd, unsigned char *ptr, int size, int offset));  static void image_inc_ptr
47  static void image_write_b PARAMS ((bfd *abfd, unsigned int value));    PARAMS ((bfd *abfd, uquad offset));
48  static void image_write_w PARAMS ((bfd *abfd, unsigned int value));  static void image_dump
49  static void image_write_l PARAMS ((bfd *abfd, unsigned long value));    PARAMS ((bfd *abfd, unsigned char *ptr, int size, int offset));
50  static void image_write_q PARAMS ((bfd *abfd, uquad value));  static void image_write_b
51  static int check_section PARAMS ((bfd *, int));    PARAMS ((bfd *abfd, unsigned int value));
52  static boolean etir_sta PARAMS ((bfd *, int, unsigned char *));  static void image_write_w
53  static boolean etir_sto PARAMS ((bfd *, int, unsigned char *));    PARAMS ((bfd *abfd, unsigned int value));
54  static boolean etir_opr PARAMS ((bfd *, int, unsigned char *));  static void image_write_l
55  static boolean etir_ctl PARAMS ((bfd *, int, unsigned char *));    PARAMS ((bfd *abfd, unsigned long value));
56  static boolean etir_stc PARAMS ((bfd *, int, unsigned char *));  static void image_write_q
57  static asection *new_section PARAMS ((bfd *, int));    PARAMS ((bfd *abfd, uquad value));
58  static int alloc_section PARAMS ((bfd *, unsigned int));  static int check_section
59  static int etir_cmd PARAMS ((bfd *, int, unsigned char *));    PARAMS ((bfd *, int));
60  static int analyze_tir PARAMS ((bfd *, unsigned char *, unsigned int));  static bfd_boolean etir_sta
61  static int analyze_etir PARAMS ((bfd *, unsigned char *, unsigned int));    PARAMS ((bfd *, int, unsigned char *));
62  static unsigned char * tir_opr PARAMS ((bfd *, unsigned char *));  static bfd_boolean etir_sto
63  static const char * tir_cmd_name PARAMS ((int));    PARAMS ((bfd *, int, unsigned char *));
64  static const char * cmd_name PARAMS ((int));  static bfd_boolean etir_opr
65      PARAMS ((bfd *, int, unsigned char *));
66    static bfd_boolean etir_ctl
67      PARAMS ((bfd *, int, unsigned char *));
68    static bfd_boolean etir_stc
69      PARAMS ((bfd *, int, unsigned char *));
70    static asection *new_section
71      PARAMS ((bfd *, int));
72    static int alloc_section
73      PARAMS ((bfd *, unsigned int));
74    static int etir_cmd
75      PARAMS ((bfd *, int, unsigned char *));
76    static int analyze_tir
77      PARAMS ((bfd *, unsigned char *, unsigned int));
78    static int analyze_etir
79      PARAMS ((bfd *, unsigned char *, unsigned int));
80    static unsigned char * tir_opr
81      PARAMS ((bfd *, unsigned char *));
82    static const char * tir_cmd_name
83      PARAMS ((int));
84    static const char * cmd_name
85      PARAMS ((int));
86    
87    
88  static int  static int
# Line 72  check_section (abfd, size) Line 93  check_section (abfd, size)
93    bfd_size_type offset;    bfd_size_type offset;
94    
95    offset = PRIV (image_ptr) - PRIV (image_section)->contents;    offset = PRIV (image_ptr) - PRIV (image_section)->contents;
96    if (offset + size > PRIV (image_section)->_raw_size)    if (offset + size > PRIV (image_section)->size)
97      {      {
98        PRIV (image_section)->contents        PRIV (image_section)->contents
99          = bfd_realloc (PRIV (image_section)->contents, offset + size);          = bfd_realloc (PRIV (image_section)->contents, offset + size);
# Line 81  check_section (abfd, size) Line 102  check_section (abfd, size)
102            (*_bfd_error_handler) (_("No Mem !"));            (*_bfd_error_handler) (_("No Mem !"));
103            return -1;            return -1;
104          }          }
105        PRIV (image_section)->_raw_size = offset + size;        PRIV (image_section)->size = offset + size;
106        PRIV (image_ptr) = PRIV (image_section)->contents + offset;        PRIV (image_ptr) = PRIV (image_section)->contents + offset;
107      }      }
108    
# Line 282  cmd_name (cmd) Line 303  cmd_name (cmd)
303    
304     see table B-8 of the openVMS linker manual.  */     see table B-8 of the openVMS linker manual.  */
305    
306  static boolean  static bfd_boolean
307  etir_sta (abfd, cmd, ptr)  etir_sta (abfd, cmd, ptr)
308       bfd *abfd;       bfd *abfd;
309       int cmd;       int cmd;
# Line 310  etir_sta (abfd, cmd, ptr) Line 331  etir_sta (abfd, cmd, ptr)
331    
332          name = _bfd_vms_save_counted_string (ptr);          name = _bfd_vms_save_counted_string (ptr);
333          entry = (vms_symbol_entry *)          entry = (vms_symbol_entry *)
334            bfd_hash_lookup (PRIV (vms_symbol_table), name, false, false);            bfd_hash_lookup (PRIV (vms_symbol_table), name, FALSE, FALSE);
335          if (entry == (vms_symbol_entry *) NULL)          if (entry == (vms_symbol_entry *) NULL)
336            {            {
337  #if VMS_DEBUG  #if VMS_DEBUG
# Line 362  etir_sta (abfd, cmd, ptr) Line 383  etir_sta (abfd, cmd, ptr)
383              (*_bfd_error_handler) (_("bad section index in %s"),              (*_bfd_error_handler) (_("bad section index in %s"),
384                                     cmd_name (cmd));                                     cmd_name (cmd));
385              bfd_set_error (bfd_error_bad_value);              bfd_set_error (bfd_error_bad_value);
386              return false;              return FALSE;
387            }            }
388          dummy = bfd_getl64 (ptr+4);          dummy = bfd_getl64 (ptr+4);
389          _bfd_vms_push (abfd, dummy, (int) psect);          _bfd_vms_push (abfd, dummy, (int) psect);
# Line 373  etir_sta (abfd, cmd, ptr) Line 394  etir_sta (abfd, cmd, ptr)
394      case ETIR_S_C_STA_MOD:      case ETIR_S_C_STA_MOD:
395      case ETIR_S_C_STA_CKARG:      case ETIR_S_C_STA_CKARG:
396        (*_bfd_error_handler) (_("unsupported STA cmd %s"), cmd_name (cmd));        (*_bfd_error_handler) (_("unsupported STA cmd %s"), cmd_name (cmd));
397        return false;        return FALSE;
398        break;        break;
399    
400      default:      default:
401        (*_bfd_error_handler) (_("reserved STA cmd %d"), cmd);        (*_bfd_error_handler) (_("reserved STA cmd %d"), cmd);
402        return false;        return FALSE;
403        break;        break;
404      }      }
405  #if VMS_DEBUG  #if VMS_DEBUG
406    _bfd_vms_debug (5, "etir_sta true\n");    _bfd_vms_debug (5, "etir_sta true\n");
407  #endif  #endif
408    return true;    return TRUE;
409  }  }
410    
411  /*  /*
# Line 397  etir_sta (abfd, cmd, ptr) Line 418  etir_sta (abfd, cmd, ptr)
418    
419     see table B-9 of the openVMS linker manual.  */     see table B-9 of the openVMS linker manual.  */
420    
421  static boolean  static bfd_boolean
422  etir_sto (abfd, cmd, ptr)  etir_sto (abfd, cmd, ptr)
423       bfd *abfd;       bfd *abfd;
424       int cmd;       int cmd;
# Line 418  etir_sto (abfd, cmd, ptr) Line 439  etir_sto (abfd, cmd, ptr)
439    
440      case ETIR_S_C_STO_B:      case ETIR_S_C_STO_B:
441        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
 #if 0  
       if (is_share)             /* FIXME */  
         (*_bfd_error_handler) ("%s: byte fixups not supported",  
                                cmd_name (cmd));  
 #endif  
442        /* FIXME: check top bits */        /* FIXME: check top bits */
443        image_write_b (abfd, (unsigned int) dummy & 0xff);        image_write_b (abfd, (unsigned int) dummy & 0xff);
444        break;        break;
# Line 432  etir_sto (abfd, cmd, ptr) Line 448  etir_sto (abfd, cmd, ptr)
448    
449      case ETIR_S_C_STO_W:      case ETIR_S_C_STO_W:
450        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
 #if 0  
       if (is_share)             /* FIXME */  
         (*_bfd_error_handler) ("%s: word fixups not supported",  
                                cmd_name (cmd));  
 #endif  
451        /* FIXME: check top bits */        /* FIXME: check top bits */
452        image_write_w (abfd, (unsigned int) dummy & 0xffff);        image_write_w (abfd, (unsigned int) dummy & 0xffff);
453        break;        break;
# Line 485  etir_sto (abfd, cmd, ptr) Line 496  etir_sto (abfd, cmd, ptr)
496    
497          name = _bfd_vms_save_counted_string (ptr);          name = _bfd_vms_save_counted_string (ptr);
498          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),
499                                                        name, false, false);                                                        name, FALSE, FALSE);
500          if (entry == (vms_symbol_entry *) NULL)          if (entry == (vms_symbol_entry *) NULL)
501            {            {
502              (*_bfd_error_handler) (_("%s: no symbol \"%s\""),              (*_bfd_error_handler) (_("%s: no symbol \"%s\""),
503                                     cmd_name (cmd), name);                                     cmd_name (cmd), name);
504              return false;              return FALSE;
505            }            }
506          else          else
507            /* FIXME, reloc.  */            /* FIXME, reloc.  */
# Line 508  etir_sto (abfd, cmd, ptr) Line 519  etir_sto (abfd, cmd, ptr)
519    
520          name = _bfd_vms_save_counted_string (ptr);          name = _bfd_vms_save_counted_string (ptr);
521          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),
522                                                        name, false, false);                                                        name, FALSE, FALSE);
523          if (entry == (vms_symbol_entry *) NULL)          if (entry == (vms_symbol_entry *) NULL)
524            {            {
525              (*_bfd_error_handler) (_("%s: no symbol \"%s\""),              (*_bfd_error_handler) (_("%s: no symbol \"%s\""),
526                                     cmd_name (cmd), name);                                     cmd_name (cmd), name);
527              return false;              return FALSE;
528            }            }
529          else          else
530            image_write_q (abfd, (uquad) (entry->symbol->value)); /* FIXME, reloc */            image_write_q (abfd, (uquad) (entry->symbol->value)); /* FIXME, reloc */
# Line 561  etir_sto (abfd, cmd, ptr) Line 572  etir_sto (abfd, cmd, ptr)
572    
573          name = _bfd_vms_save_counted_string (ptr);          name = _bfd_vms_save_counted_string (ptr);
574          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),          entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),
575                                                        name, false, false);                                                        name, FALSE, FALSE);
576          if (entry == (vms_symbol_entry *) NULL)          if (entry == (vms_symbol_entry *) NULL)
577            {            {
578  #if VMS_DEBUG  #if VMS_DEBUG
# Line 591  etir_sto (abfd, cmd, ptr) Line 602  etir_sto (abfd, cmd, ptr)
602        break;        break;
603      }      }
604    
605    return true;    return TRUE;
606  }  }
607    
608  /* Stack operator commands  /* Stack operator commands
# Line 601  etir_sto (abfd, cmd, ptr) Line 612  etir_sto (abfd, cmd, ptr)
612    
613     see table B-10 of the openVMS linker manual.  */     see table B-10 of the openVMS linker manual.  */
614    
615  static boolean  static bfd_boolean
616  etir_opr (abfd, cmd, ptr)  etir_opr (abfd, cmd, ptr)
617       bfd *abfd;       bfd *abfd;
618       int cmd;       int cmd;
# Line 709  etir_opr (abfd, cmd, ptr) Line 720  etir_opr (abfd, cmd, ptr)
720        break;        break;
721      }      }
722    
723    return true;    return TRUE;
724  }  }
725    
726  /* Control commands.  /* Control commands.
727    
728     See table B-11 of the openVMS linker manual.  */     See table B-11 of the openVMS linker manual.  */
729    
730  static boolean  static bfd_boolean
731  etir_ctl (abfd, cmd, ptr)  etir_ctl (abfd, cmd, ptr)
732       bfd *abfd;       bfd *abfd;
733       int cmd;       int cmd;
# Line 776  etir_ctl (abfd, cmd, ptr) Line 787  etir_ctl (abfd, cmd, ptr)
787        (*_bfd_error_handler) (_("reserved CTL cmd %d"), cmd);        (*_bfd_error_handler) (_("reserved CTL cmd %d"), cmd);
788        break;        break;
789      }      }
790    return true;    return TRUE;
791  }  }
792    
793  /* store conditional commands  /* store conditional commands
794    
795     See table B-12 and B-13 of the openVMS linker manual.  */     See table B-12 and B-13 of the openVMS linker manual.  */
796    
797  static boolean  static bfd_boolean
798  etir_stc (abfd, cmd, ptr)  etir_stc (abfd, cmd, ptr)
799       bfd *abfd;       bfd *abfd;
800       int cmd;       int cmd;
# Line 805  etir_stc (abfd, cmd, ptr) Line 816  etir_stc (abfd, cmd, ptr)
816    
817        /* 201 Store-conditional Linkage Pair with Procedure Signature        /* 201 Store-conditional Linkage Pair with Procedure Signature
818           arg:   lw      linkage index           arg:   lw      linkage index
819                  cs      procedure name                  cs      procedure name
820                  by      signature length                  by      signature length
821                  da      signature.  */                  da      signature.  */
822    
823      case ETIR_S_C_STC_LP_PSB:      case ETIR_S_C_STC_LP_PSB:
824        image_inc_ptr (abfd, (uquad) 16); /* skip entry,procval */        image_inc_ptr (abfd, (uquad) 16); /* skip entry,procval */
# Line 815  etir_stc (abfd, cmd, ptr) Line 826  etir_stc (abfd, cmd, ptr)
826    
827        /* 202 Store-conditional Address at global address        /* 202 Store-conditional Address at global address
828           arg:   lw      linkage index           arg:   lw      linkage index
829                  cs      global name  */                  cs      global name.  */
830    
831      case ETIR_S_C_STC_GBL:      case ETIR_S_C_STC_GBL:
832        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));
# Line 823  etir_stc (abfd, cmd, ptr) Line 834  etir_stc (abfd, cmd, ptr)
834    
835        /* 203 Store-conditional Code Address at global address        /* 203 Store-conditional Code Address at global address
836           arg:   lw      linkage index           arg:   lw      linkage index
837                  cs      procedure name  */                  cs      procedure name.  */
838    
839      case ETIR_S_C_STC_GCA:      case ETIR_S_C_STC_GCA:
840        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));
# Line 831  etir_stc (abfd, cmd, ptr) Line 842  etir_stc (abfd, cmd, ptr)
842    
843        /* 204 Store-conditional Address at psect + offset        /* 204 Store-conditional Address at psect + offset
844           arg:   lw      linkage index           arg:   lw      linkage index
845                  lw      psect index                  lw      psect index
846                  qw      offset  */                  qw      offset.  */
847    
848      case ETIR_S_C_STC_PS:      case ETIR_S_C_STC_PS:
849        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));        (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd));
# Line 888  etir_stc (abfd, cmd, ptr) Line 899  etir_stc (abfd, cmd, ptr)
899    
900      case ETIR_S_C_STC_NBH_PS:      case ETIR_S_C_STC_NBH_PS:
901        /* FIXME */        /* FIXME */
 #if 0  
       (*_bfd_error_handler) ("%s: not supported", cmd_name (cmd));  
 #endif  
902        break;        break;
903    
904      default:      default:
# Line 899  etir_stc (abfd, cmd, ptr) Line 907  etir_stc (abfd, cmd, ptr)
907  #endif  #endif
908        break;        break;
909      }      }
910    return true;    return TRUE;
911  }  }
912    
913  static asection *  static asection *
# Line 930  new_section (abfd, idx) Line 938  new_section (abfd, idx)
938        return 0;        return 0;
939      }      }
940    
941    section->_raw_size = 0;    section->size = 0;
942    section->vma = 0;    section->vma = 0;
943    section->contents = 0;    section->contents = 0;
   section->_cooked_size = 0;  
944    section->name = name;    section->name = name;
945    section->index = idx;    section->index = idx;
946    
# Line 970  alloc_section (abfd, idx) Line 977  alloc_section (abfd, idx)
977  }  }
978    
979  /* tir_sta  /* tir_sta
980    
981     vax stack commands     vax stack commands
982      
983     Handle sta_xxx commands in tir section     Handle sta_xxx commands in tir section
984     ptr points to data area in record     ptr points to data area in record
985      
986     See table 7-3 of the VAX/VMS linker manual.  */     See table 7-3 of the VAX/VMS linker manual.  */
987    
988  static unsigned char *  static unsigned char *
# Line 992  tir_sta (bfd *abfd, unsigned char *ptr) Line 999  tir_sta (bfd *abfd, unsigned char *ptr)
999        /* stack */        /* stack */
1000      case TIR_S_C_STA_GBL:      case TIR_S_C_STA_GBL:
1001        /* stack global        /* stack global
1002           arg: cs        symbol name           arg: cs        symbol name
1003            
1004           stack 32 bit value of symbol (high bits set to 0).  */           stack 32 bit value of symbol (high bits set to 0).  */
1005        {        {
1006          char *name;          char *name;
1007          vms_symbol_entry *entry;          vms_symbol_entry *entry;
# Line 1012  tir_sta (bfd *abfd, unsigned char *ptr) Line 1019  tir_sta (bfd *abfd, unsigned char *ptr)
1019    
1020      case TIR_S_C_STA_SB:      case TIR_S_C_STA_SB:
1021        /* stack signed byte        /* stack signed byte
1022           arg: by        value           arg: by        value
1023            
1024           stack byte value, sign extend to 32 bit.  */           stack byte value, sign extend to 32 bit.  */
1025        _bfd_vms_push (abfd, (uquad) *ptr++, -1);        _bfd_vms_push (abfd, (uquad) *ptr++, -1);
1026        break;        break;
1027    
1028      case TIR_S_C_STA_SW:      case TIR_S_C_STA_SW:
1029        /* stack signed short word        /* stack signed short word
1030           arg: sh        value           arg: sh        value
1031            
1032           stack 16 bit value, sign extend to 32 bit.  */           stack 16 bit value, sign extend to 32 bit.  */
1033        _bfd_vms_push (abfd, (uquad) bfd_getl16 (ptr), -1);        _bfd_vms_push (abfd, (uquad) bfd_getl16 (ptr), -1);
1034        ptr += 2;        ptr += 2;
1035        break;        break;
1036    
1037      case TIR_S_C_STA_LW:      case TIR_S_C_STA_LW:
1038        /* stack signed longword        /* stack signed longword
1039           arg: lw        value           arg: lw        value
1040            
1041           stack 32 bit value.  */           stack 32 bit value.  */
1042        _bfd_vms_push (abfd, (uquad) bfd_getl32 (ptr), -1);        _bfd_vms_push (abfd, (uquad) bfd_getl32 (ptr), -1);
1043        ptr += 4;        ptr += 4;
1044        break;        break;
# Line 1039  tir_sta (bfd *abfd, unsigned char *ptr) Line 1046  tir_sta (bfd *abfd, unsigned char *ptr)
1046      case TIR_S_C_STA_PB:      case TIR_S_C_STA_PB:
1047      case TIR_S_C_STA_WPB:      case TIR_S_C_STA_WPB:
1048        /* stack psect base plus byte offset (word index)        /* stack psect base plus byte offset (word index)
1049           arg: by        section index           arg: by        section index
1050                  (sh     section index)                  (sh     section index)
1051                  by      signed byte offset.  */                  by      signed byte offset.  */
1052        {        {
1053          unsigned long dummy;          unsigned long dummy;
1054          unsigned int psect;          unsigned int psect;
# Line 1066  tir_sta (bfd *abfd, unsigned char *ptr) Line 1073  tir_sta (bfd *abfd, unsigned char *ptr)
1073      case TIR_S_C_STA_PW:      case TIR_S_C_STA_PW:
1074      case TIR_S_C_STA_WPW:      case TIR_S_C_STA_WPW:
1075        /* stack psect base plus word offset (word index)        /* stack psect base plus word offset (word index)
1076           arg: by        section index           arg: by        section index
1077                  (sh     section index)                  (sh     section index)
1078                  sh      signed short offset.  */                  sh      signed short offset.  */
1079        {        {
1080          unsigned long dummy;          unsigned long dummy;
1081          unsigned int psect;          unsigned int psect;
# Line 1093  tir_sta (bfd *abfd, unsigned char *ptr) Line 1100  tir_sta (bfd *abfd, unsigned char *ptr)
1100      case TIR_S_C_STA_PL:      case TIR_S_C_STA_PL:
1101      case TIR_S_C_STA_WPL:      case TIR_S_C_STA_WPL:
1102        /* stack psect base plus long offset (word index)        /* stack psect base plus long offset (word index)
1103           arg: by        section index           arg: by        section index
1104                  (sh     section index)                  (sh     section index)
1105                  lw      signed longword offset.  */                  lw      signed longword offset.  */
1106        {        {
1107          unsigned long dummy;          unsigned long dummy;
1108          unsigned int psect;          unsigned int psect;
# Line 1119  tir_sta (bfd *abfd, unsigned char *ptr) Line 1126  tir_sta (bfd *abfd, unsigned char *ptr)
1126    
1127      case TIR_S_C_STA_UB:      case TIR_S_C_STA_UB:
1128        /* stack unsigned byte        /* stack unsigned byte
1129           arg: by        value           arg: by        value
1130            
1131           stack byte value.  */           stack byte value.  */
1132        _bfd_vms_push (abfd, (uquad) *ptr++, -1);        _bfd_vms_push (abfd, (uquad) *ptr++, -1);
1133        break;        break;
1134    
1135      case TIR_S_C_STA_UW:      case TIR_S_C_STA_UW:
1136        /* stack unsigned short word        /* stack unsigned short word
1137           arg: sh        value           arg: sh        value
1138            
1139           stack 16 bit value.  */           stack 16 bit value.  */
1140        _bfd_vms_push (abfd, (uquad) bfd_getl16 (ptr), -1);        _bfd_vms_push (abfd, (uquad) bfd_getl16 (ptr), -1);
1141        ptr += 2;        ptr += 2;
1142        break;        break;
1143    
1144      case TIR_S_C_STA_BFI:      case TIR_S_C_STA_BFI:
1145        /* stack byte from image        /* stack byte from image
1146           arg: none.  */           arg: none.  */
1147        /* FALLTHRU  */        /* FALLTHRU  */
1148      case TIR_S_C_STA_WFI:      case TIR_S_C_STA_WFI:
1149        /* stack byte from image        /* stack byte from image
1150           arg: none.  */           arg: none.  */
1151        /* FALLTHRU */        /* FALLTHRU */
1152      case TIR_S_C_STA_LFI:      case TIR_S_C_STA_LFI:
1153        /* stack byte from image        /* stack byte from image
1154           arg: none.  */           arg: none.  */
1155        (*_bfd_error_handler) (_("stack-from-image not implemented"));        (*_bfd_error_handler) (_("stack-from-image not implemented"));
1156        return NULL;        return NULL;
1157    
1158      case TIR_S_C_STA_EPM:      case TIR_S_C_STA_EPM:
1159        /* stack entry point mask        /* stack entry point mask
1160           arg: cs        symbol name           arg: cs        symbol name
1161            
1162           stack (unsigned) entry point mask of symbol           stack (unsigned) entry point mask of symbol
1163           err if symbol is no entry point.  */           err if symbol is no entry point.  */
1164        {        {
1165          char *name;          char *name;
1166          vms_symbol_entry *entry;          vms_symbol_entry *entry;
# Line 1171  tir_sta (bfd *abfd, unsigned char *ptr) Line 1178  tir_sta (bfd *abfd, unsigned char *ptr)
1178    
1179      case TIR_S_C_STA_CKARG:      case TIR_S_C_STA_CKARG:
1180        /* compare procedure argument        /* compare procedure argument
1181           arg: cs        symbol name           arg: cs        symbol name
1182                  by      argument index                  by      argument index
1183                  da      argument descriptor                  da      argument descriptor
1184            
1185           compare argument descriptor with symbol argument (ARG$V_PASSMECH)           compare argument descriptor with symbol argument (ARG$V_PASSMECH)
1186           and stack TRUE (args match) or FALSE (args dont match) value.  */           and stack TRUE (args match) or FALSE (args dont match) value.  */
1187        (*_bfd_error_handler) (_("PASSMECH not fully implemented"));        (*_bfd_error_handler) (_("PASSMECH not fully implemented"));
1188        _bfd_vms_push (abfd, (uquad) 1, -1);        _bfd_vms_push (abfd, (uquad) 1, -1);
1189        break;        break;
1190    
1191      case TIR_S_C_STA_LSY:      case TIR_S_C_STA_LSY:
1192        /* stack local symbol value        /* stack local symbol value
1193           arg:   sh      environment index           arg:   sh      environment index
1194                  cs      symbol name.  */                  cs      symbol name.  */
1195        {        {
1196          int envidx;          int envidx;
1197          char *name;          char *name;
# Line 1204  tir_sta (bfd *abfd, unsigned char *ptr) Line 1211  tir_sta (bfd *abfd, unsigned char *ptr)
1211    
1212      case TIR_S_C_STA_LIT:      case TIR_S_C_STA_LIT:
1213        /* stack literal        /* stack literal
1214           arg:   by      literal index           arg:   by      literal index
1215            
1216           stack literal.  */           stack literal.  */
1217        ptr++;        ptr++;
1218        _bfd_vms_push (abfd, (uquad) 0, -1);        _bfd_vms_push (abfd, (uquad) 0, -1);
1219        (*_bfd_error_handler) (_("stack-literal not fully implemented"));        (*_bfd_error_handler) (_("stack-literal not fully implemented"));
# Line 1214  tir_sta (bfd *abfd, unsigned char *ptr) Line 1221  tir_sta (bfd *abfd, unsigned char *ptr)
1221    
1222      case TIR_S_C_STA_LEPM:      case TIR_S_C_STA_LEPM:
1223        /* stack local symbol entry point mask        /* stack local symbol entry point mask
1224           arg:   sh      environment index           arg:   sh      environment index
1225                  cs      symbol name                  cs      symbol name
1226            
1227           stack (unsigned) entry point mask of symbol           stack (unsigned) entry point mask of symbol
1228           err if symbol is no entry point.  */           err if symbol is no entry point.  */
1229        {        {
1230          int envidx;          int envidx;
1231          char *name;          char *name;
# Line 1277  tir_cmd_name (cmd) Line 1284  tir_cmd_name (cmd)
1284  }  }
1285    
1286  /* tir_sto  /* tir_sto
1287      
1288     vax store commands     vax store commands
1289      
1290     handle sto_xxx commands in tir section     handle sto_xxx commands in tir section
1291     ptr points to data area in record     ptr points to data area in record
1292      
1293     See table 7-4 of the VAX/VMS linker manual.  */     See table 7-4 of the VAX/VMS linker manual.  */
1294    
1295  static unsigned char *  static unsigned char *
# Line 1300  tir_sto (bfd *abfd, unsigned char *ptr) Line 1307  tir_sto (bfd *abfd, unsigned char *ptr)
1307      {      {
1308      case TIR_S_C_STO_SB:      case TIR_S_C_STO_SB:
1309        /* store signed byte: pop stack, write byte        /* store signed byte: pop stack, write byte
1310           arg: none.  */           arg: none.  */
1311        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1312        image_write_b (abfd, dummy & 0xff);       /* FIXME: check top bits */        image_write_b (abfd, dummy & 0xff);       /* FIXME: check top bits */
1313        break;        break;
1314    
1315      case TIR_S_C_STO_SW:      case TIR_S_C_STO_SW:
1316        /* store signed word: pop stack, write word        /* store signed word: pop stack, write word
1317           arg: none.  */           arg: none.  */
1318        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1319        image_write_w (abfd, dummy & 0xffff);     /* FIXME: check top bits */        image_write_w (abfd, dummy & 0xffff);     /* FIXME: check top bits */
1320        break;        break;
1321    
1322      case TIR_S_C_STO_LW:      case TIR_S_C_STO_LW:
1323        /* store longword: pop stack, write longword        /* store longword: pop stack, write longword
1324           arg: none.  */           arg: none.  */
1325        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1326        image_write_l (abfd, dummy & 0xffffffff); /* FIXME: check top bits */        image_write_l (abfd, dummy & 0xffffffff); /* FIXME: check top bits */
1327        break;        break;
1328    
1329      case TIR_S_C_STO_BD:      case TIR_S_C_STO_BD:
1330        /* store byte displaced: pop stack, sub lc+1, write byte        /* store byte displaced: pop stack, sub lc+1, write byte
1331           arg: none.  */           arg: none.  */
1332        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1333        dummy -= ((PRIV (sections)[psect])->vma + 1);        dummy -= ((PRIV (sections)[psect])->vma + 1);
1334        image_write_b (abfd, dummy & 0xff);/* FIXME: check top bits */        image_write_b (abfd, dummy & 0xff);/* FIXME: check top bits */
# Line 1329  tir_sto (bfd *abfd, unsigned char *ptr) Line 1336  tir_sto (bfd *abfd, unsigned char *ptr)
1336    
1337      case TIR_S_C_STO_WD:      case TIR_S_C_STO_WD:
1338        /* store word displaced: pop stack, sub lc+2, write word        /* store word displaced: pop stack, sub lc+2, write word
1339           arg: none.  */           arg: none.  */
1340        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1341        dummy -= ((PRIV (sections)[psect])->vma + 2);        dummy -= ((PRIV (sections)[psect])->vma + 2);
1342        image_write_w (abfd, dummy & 0xffff);/* FIXME: check top bits */        image_write_w (abfd, dummy & 0xffff);/* FIXME: check top bits */
# Line 1337  tir_sto (bfd *abfd, unsigned char *ptr) Line 1344  tir_sto (bfd *abfd, unsigned char *ptr)
1344    
1345      case TIR_S_C_STO_LD:      case TIR_S_C_STO_LD:
1346        /* store long displaced: pop stack, sub lc+4, write long        /* store long displaced: pop stack, sub lc+4, write long
1347           arg: none.  */           arg: none.  */
1348        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1349        dummy -= ((PRIV (sections)[psect])->vma + 4);        dummy -= ((PRIV (sections)[psect])->vma + 4);
1350        image_write_l (abfd, dummy & 0xffffffff);/* FIXME: check top bits */        image_write_l (abfd, dummy & 0xffffffff);/* FIXME: check top bits */
# Line 1345  tir_sto (bfd *abfd, unsigned char *ptr) Line 1352  tir_sto (bfd *abfd, unsigned char *ptr)
1352    
1353      case TIR_S_C_STO_LI:      case TIR_S_C_STO_LI:
1354        /* store short literal: pop stack, write byte        /* store short literal: pop stack, write byte
1355           arg: none.  */           arg: none.  */
1356        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1357        image_write_b (abfd, dummy & 0xff);/* FIXME: check top bits */        image_write_b (abfd, dummy & 0xff);/* FIXME: check top bits */
1358        break;        break;
1359    
1360      case TIR_S_C_STO_PIDR:      case TIR_S_C_STO_PIDR:
1361        /* store position independent data reference: pop stack, write longword        /* store position independent data reference: pop stack, write longword
1362           arg: none.           arg: none.
1363           FIXME: incomplete !  */           FIXME: incomplete !  */
1364        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1365        image_write_l (abfd, dummy & 0xffffffff);        image_write_l (abfd, dummy & 0xffffffff);
# Line 1360  tir_sto (bfd *abfd, unsigned char *ptr) Line 1367  tir_sto (bfd *abfd, unsigned char *ptr)
1367    
1368      case TIR_S_C_STO_PICR:      case TIR_S_C_STO_PICR:
1369        /* store position independent code reference: pop stack, write longword        /* store position independent code reference: pop stack, write longword
1370           arg: none.           arg: none.
1371           FIXME: incomplete !  */           FIXME: incomplete !  */
1372        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, &psect);
1373        image_write_b (abfd, 0x9f);        image_write_b (abfd, 0x9f);
1374        image_write_l (abfd, dummy & 0xffffffff);        image_write_l (abfd, dummy & 0xffffffff);
# Line 1369  tir_sto (bfd *abfd, unsigned char *ptr) Line 1376  tir_sto (bfd *abfd, unsigned char *ptr)
1376    
1377      case TIR_S_C_STO_RIVB:      case TIR_S_C_STO_RIVB:
1378        /* store repeated immediate variable bytes        /* store repeated immediate variable bytes
1379           1-byte count n field followed by n bytes of data           1-byte count n field followed by n bytes of data
1380           pop stack, write n bytes <stack> times.  */           pop stack, write n bytes <stack> times.  */
1381        size = *ptr++;        size = *ptr++;
1382        dummy = (unsigned long) _bfd_vms_pop (abfd, NULL);        dummy = (unsigned long) _bfd_vms_pop (abfd, NULL);
1383        while (dummy-- > 0L)        while (dummy-- > 0L)
# Line 1430  tir_sto (bfd *abfd, unsigned char *ptr) Line 1437  tir_sto (bfd *abfd, unsigned char *ptr)
1437     all 32 bit signed arithmetic     all 32 bit signed arithmetic
1438     all word just like a stack calculator     all word just like a stack calculator
1439     arguments are popped from stack, results are pushed on stack     arguments are popped from stack, results are pushed on stack
1440      
1441     See table 7-5 of the VAX/VMS linker manual.  */     See table 7-5 of the VAX/VMS linker manual.  */
1442    
1443  static unsigned char *  static unsigned char *
# Line 1573  tir_opr (abfd, ptr) Line 1580  tir_opr (abfd, ptr)
1580  }  }
1581    
1582  /* control commands  /* control commands
1583      
1584     See table 7-6 of the VAX/VMS linker manual.  */     See table 7-6 of the VAX/VMS linker manual.  */
1585    
1586  static unsigned char *  static unsigned char *
# Line 1590  tir_ctl (bfd *abfd, unsigned char *ptr) Line 1597  tir_ctl (bfd *abfd, unsigned char *ptr)
1597      {      {
1598      case TIR_S_C_CTL_SETRB:      case TIR_S_C_CTL_SETRB:
1599        /* Set relocation base: pop stack, set image location counter        /* Set relocation base: pop stack, set image location counter
1600           arg: none.  */           arg: none.  */
1601        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, (int *) &psect);
1602        if (psect >= PRIV (section_count))        if (psect >= PRIV (section_count))
1603          alloc_section (abfd, psect);          alloc_section (abfd, psect);
1604        image_set_ptr (abfd, (int) psect, (uquad) dummy);        image_set_ptr (abfd, (int) psect, (uquad) dummy);
# Line 1599  tir_ctl (bfd *abfd, unsigned char *ptr) Line 1606  tir_ctl (bfd *abfd, unsigned char *ptr)
1606    
1607      case TIR_S_C_CTL_AUGRB:      case TIR_S_C_CTL_AUGRB:
1608        /* Augment relocation base: increment image location counter by offset        /* Augment relocation base: increment image location counter by offset
1609           arg: lw        offset value.  */           arg: lw        offset value.  */
1610        dummy = bfd_getl32 (ptr);        dummy = bfd_getl32 (ptr);
1611        image_inc_ptr (abfd, (uquad) dummy);        image_inc_ptr (abfd, (uquad) dummy);
1612        break;        break;
1613    
1614      case TIR_S_C_CTL_DFLOC:      case TIR_S_C_CTL_DFLOC:
1615        /* Define location: pop index, save location counter under index        /* Define location: pop index, save location counter under index
1616           arg: none.  */           arg: none.  */
1617        dummy = _bfd_vms_pop (abfd, NULL);        dummy = _bfd_vms_pop (abfd, NULL);
1618        (*_bfd_error_handler) (_("%s: not fully implemented"),        (*_bfd_error_handler) (_("%s: not fully implemented"),
1619                               tir_cmd_name (ptr[-1]));                               tir_cmd_name (ptr[-1]));
# Line 1614  tir_ctl (bfd *abfd, unsigned char *ptr) Line 1621  tir_ctl (bfd *abfd, unsigned char *ptr)
1621    
1622      case TIR_S_C_CTL_STLOC:      case TIR_S_C_CTL_STLOC:
1623        /* Set location: pop index, restore location counter from index        /* Set location: pop index, restore location counter from index
1624           arg: none.  */           arg: none.  */
1625        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, (int *) &psect);
1626        (*_bfd_error_handler) (_("%s: not fully implemented"),        (*_bfd_error_handler) (_("%s: not fully implemented"),
1627                               tir_cmd_name (ptr[-1]));                               tir_cmd_name (ptr[-1]));
1628        break;        break;
1629    
1630      case TIR_S_C_CTL_STKDL:      case TIR_S_C_CTL_STKDL:
1631        /* Stack defined location: pop index, push location counter from index        /* Stack defined location: pop index, push location counter from index
1632           arg: none.  */           arg: none.  */
1633        dummy = _bfd_vms_pop (abfd, &psect);        dummy = _bfd_vms_pop (abfd, (int *) &psect);
1634        (*_bfd_error_handler) (_("%s: not fully implemented"),        (*_bfd_error_handler) (_("%s: not fully implemented"),
1635                               tir_cmd_name (ptr[-1]));                               tir_cmd_name (ptr[-1]));
1636        break;        break;
# Line 1648  tir_cmd (bfd *abfd, unsigned char *ptr) Line 1655  tir_cmd (bfd *abfd, unsigned char *ptr)
1655    }    }
1656    tir_table[] =    tir_table[] =
1657    {    {
1658      { 0,                 TIR_S_C_MAXSTACOD, tir_sta },      { 0,                 TIR_S_C_MAXSTACOD, tir_sta },
1659      { TIR_S_C_MINSTOCOD, TIR_S_C_MAXSTOCOD, tir_sto },      { TIR_S_C_MINSTOCOD, TIR_S_C_MAXSTOCOD, tir_sto },
1660      { TIR_S_C_MINOPRCOD, TIR_S_C_MAXOPRCOD, tir_opr },      { TIR_S_C_MINOPRCOD, TIR_S_C_MAXOPRCOD, tir_opr },
1661      { TIR_S_C_MINCTLCOD, TIR_S_C_MAXCTLCOD, tir_ctl },      { TIR_S_C_MINCTLCOD, TIR_S_C_MAXCTLCOD, tir_ctl },
# Line 1701  etir_cmd (abfd, cmd, ptr) Line 1708  etir_cmd (abfd, cmd, ptr)
1708    {    {
1709      int mincod;      int mincod;
1710      int maxcod;      int maxcod;
1711      boolean (*explain) PARAMS ((bfd *, int, unsigned char *));      bfd_boolean (*explain) PARAMS ((bfd *, int, unsigned char *));
1712    }    }
1713    etir_table[] =    etir_table[] =
1714    {    {
# Line 1891  _bfd_vms_slurp_lnk (abfd, objtype) Line 1898  _bfd_vms_slurp_lnk (abfd, objtype)
1898    
1899     This is still under construction and therefore not documented.  */     This is still under construction and therefore not documented.  */
1900    
1901  static void start_etir_record PARAMS ((bfd *abfd, int index, uquad offset, boolean justoffset));  static void start_etir_record
1902  static void sto_imm PARAMS ((bfd *abfd, vms_section *sptr, bfd_vma vaddr, int index));    PARAMS ((bfd *abfd, int index, uquad offset, bfd_boolean justoffset));
1903  static void end_etir_record PARAMS ((bfd *abfd));  static void sto_imm
1904      PARAMS ((bfd *abfd, vms_section *sptr, bfd_vma vaddr, int index));
1905    static void end_etir_record
1906      PARAMS ((bfd *abfd));
1907    
1908  static void  static void
1909  sto_imm (abfd, sptr, vaddr, index)  sto_imm (abfd, sptr, vaddr, index)
# Line 1921  sto_imm (abfd, sptr, vaddr, index) Line 1931  sto_imm (abfd, sptr, vaddr, index)
1931        if (_bfd_vms_output_check (abfd, size) < 0)        if (_bfd_vms_output_check (abfd, size) < 0)
1932          {                                       /* doesn't fit, split ! */          {                                       /* doesn't fit, split ! */
1933            end_etir_record (abfd);            end_etir_record (abfd);
1934            start_etir_record (abfd, index, vaddr, false);            start_etir_record (abfd, index, vaddr, FALSE);
1935            size = _bfd_vms_output_check (abfd, 0);       /* get max size */            size = _bfd_vms_output_check (abfd, 0);       /* get max size */
1936            if (size > ssize)                     /* more than what's left ? */            if (size > ssize)                     /* more than what's left ? */
1937              size = ssize;              size = ssize;
# Line 1950  start_etir_record (abfd, index, offset, Line 1960  start_etir_record (abfd, index, offset,
1960      bfd *abfd;      bfd *abfd;
1961      int index;      int index;
1962      uquad offset;      uquad offset;
1963      boolean justoffset;      bfd_boolean justoffset;
1964  {  {
1965    if (!justoffset)    if (!justoffset)
1966      {      {
# Line 2007  _bfd_vms_write_tir (abfd, objtype) Line 2017  _bfd_vms_write_tir (abfd, objtype)
2017  #if VMS_DEBUG  #if VMS_DEBUG
2018        _bfd_vms_debug (4, "writing %d. section '%s' (%d bytes)\n",        _bfd_vms_debug (4, "writing %d. section '%s' (%d bytes)\n",
2019                        section->index, section->name,                        section->index, section->name,
2020                        (int) (section->_raw_size));                        (int) (section->size));
2021  #endif  #endif
2022    
2023        if (section->flags & SEC_RELOC)        if (section->flags & SEC_RELOC)
# Line 2055  _bfd_vms_write_tir (abfd, objtype) Line 2065  _bfd_vms_write_tir (abfd, objtype)
2065            vaddr = (bfd_vma) (sptr->offset);            vaddr = (bfd_vma) (sptr->offset);
2066    
2067            start_etir_record (abfd, section->index, (uquad) sptr->offset,            start_etir_record (abfd, section->index, (uquad) sptr->offset,
2068                               false);                               FALSE);
2069    
2070            while (sptr != NULL)  /* one STA_PQ, CTL_SETRB per vms_section */            while (sptr != NULL)  /* one STA_PQ, CTL_SETRB per vms_section */
2071              {              {
# Line 2111  _bfd_vms_write_tir (abfd, objtype) Line 2121  _bfd_vms_write_tir (abfd, objtype)
2121                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2122                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2123                                                             section->index,                                                             section->index,
2124                                                             vaddr, false);                                                             vaddr, FALSE);
2125                                        }                                        }
2126                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2127                                                             ETIR_S_C_STO_GBL_LW,                                                             ETIR_S_C_STO_GBL_LW,
# Line 2128  _bfd_vms_write_tir (abfd, objtype) Line 2138  _bfd_vms_write_tir (abfd, objtype)
2138                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2139                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2140                                                             section->index,                                                             section->index,
2141                                                             vaddr, false);                                                             vaddr, FALSE);
2142                                        }                                        }
2143                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2144                                                             ETIR_S_C_STA_LW,                                                             ETIR_S_C_STA_LW,
# Line 2148  _bfd_vms_write_tir (abfd, objtype) Line 2158  _bfd_vms_write_tir (abfd, objtype)
2158                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2159                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2160                                                             section->index,                                                             section->index,
2161                                                             vaddr, false);                                                             vaddr, FALSE);
2162                                        }                                        }
2163                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2164                                                             ETIR_S_C_STA_PQ,                                                             ETIR_S_C_STA_PQ,
# Line 2178  _bfd_vms_write_tir (abfd, objtype) Line 2188  _bfd_vms_write_tir (abfd, objtype)
2188                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2189                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2190                                                             section->index,                                                             section->index,
2191                                                             vaddr, false);                                                             vaddr, FALSE);
2192                                        }                                        }
2193                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2194                                                             ETIR_S_C_STO_GBL,                                                             ETIR_S_C_STO_GBL,
# Line 2195  _bfd_vms_write_tir (abfd, objtype) Line 2205  _bfd_vms_write_tir (abfd, objtype)
2205                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2206                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2207                                                             section->index,                                                             section->index,
2208                                                             vaddr, false);                                                             vaddr, FALSE);
2209                                        }                                        }
2210                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2211                                                             ETIR_S_C_STA_QW,                                                             ETIR_S_C_STA_QW,
# Line 2215  _bfd_vms_write_tir (abfd, objtype) Line 2225  _bfd_vms_write_tir (abfd, objtype)
2225                                          end_etir_record (abfd);                                          end_etir_record (abfd);
2226                                          start_etir_record (abfd,                                          start_etir_record (abfd,
2227                                                             section->index,                                                             section->index,
2228                                                             vaddr, false);                                                             vaddr, FALSE);
2229                                        }                                        }
2230                                      _bfd_vms_output_begin (abfd,                                      _bfd_vms_output_begin (abfd,
2231                                                             ETIR_S_C_STA_PQ,                                                             ETIR_S_C_STA_PQ,
# Line 2243  _bfd_vms_write_tir (abfd, objtype) Line 2253  _bfd_vms_write_tir (abfd, objtype)
2253                                  sptr->size = len;                                  sptr->size = len;
2254                                  sto_imm (abfd, sptr, vaddr, section->index);                                  sto_imm (abfd, sptr, vaddr, section->index);
2255                                  sptr->size = hint_size;                                  sptr->size = hint_size;
 #if 0  
                                 vms_output_begin (abfd,  
                                                   ETIR_S_C_STO_HINT_GBL, -1);  
                                 vms_output_long (abfd,  
                                                  (unsigned long) (sec->index));  
                                 vms_output_quad (abfd, (uquad) addr);  
   
                                 hash = (_bfd_vms_length_hash_symbol  
                                         (abfd, sym->name, EOBJ_S_C_SYMSIZ));  
                                 vms_output_counted (abfd, hash);  
   
                                 vms_output_flush (abfd);  
 #endif  
2256                                }                                }
2257                                break;                                break;
2258                              case ALPHA_R_LINKAGE:                              case ALPHA_R_LINKAGE:
# Line 2266  _bfd_vms_write_tir (abfd, objtype) Line 2263  _bfd_vms_write_tir (abfd, objtype)
2263                                    {                                    {
2264                                      end_etir_record (abfd);                                      end_etir_record (abfd);
2265                                      start_etir_record (abfd, section->index,                                      start_etir_record (abfd, section->index,
2266                                                         vaddr, false);                                                         vaddr, FALSE);
2267                                    }                                    }
2268                                  _bfd_vms_output_begin (abfd,                                  _bfd_vms_output_begin (abfd,
2269                                                         ETIR_S_C_STC_LP_PSB,                                                         ETIR_S_C_STC_LP_PSB,
# Line 2291  _bfd_vms_write_tir (abfd, objtype) Line 2288  _bfd_vms_write_tir (abfd, objtype)
2288                                      end_etir_record (abfd);                                      end_etir_record (abfd);
2289                                      start_etir_record (abfd,                                      start_etir_record (abfd,
2290                                                         section->index,                                                         section->index,
2291                                                         vaddr, false);                                                         vaddr, FALSE);
2292                                    }                                    }
2293                                  _bfd_vms_output_begin (abfd,                                  _bfd_vms_output_begin (abfd,
2294                                                         ETIR_S_C_STO_CA,                                                         ETIR_S_C_STO_CA,

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26