bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCOFF->C_BSTAT,C_ESTAT in the wrong section


From: Michael Walsh
Subject: XCOFF->C_BSTAT,C_ESTAT in the wrong section
Date: Sat, 22 Feb 2003 08:21:32 -0500

Hello,
I have been looking at some issues with the AIX 4.3 XCOFF format and discovered that gas is storing static blocks in the wrong section when debugging. I didn't see anything in the logs concerning this so I'll submit it as a bug. Neither ld or the native linker can detect this error. It really makes a mess when linked with a similar file compiled by the native compiler.



The table below is from the AIX 4.3 documentation at:
http://publib16.boulder.ibm.com/pseries/en_US/files/aixfiles/XCOFF.htm#yaa3i18fjbau

Table 31. Symbol Table by Storage Class


| Symbol | n_name | n_vlaue | n_scnum | Aux.Entry
----------------------------------------------------------|
C_BSTAT  |  .bs   | symbol table index | N_DEBUG  | ---
----------------------------------------------------------|
C_ESTAT  |  .es   | symbol table index | N_DEBUG  | ---
----------------------------------------------------------|

These are dbx storage classes, gas is storing these classes in the text section, setting
n_scnum to N_SCNUM (1)

These snippets are from /src/gas/config/tc-ppc.c

static void
ppc_bs (ignore)
     int ignore ATTRIBUTE_UNUSED;
{
  char *name;
  char endc;
  symbolS *csect;
  symbolS *sym;

  if (ppc_current_block != NULL)
    as_bad (_("nested .bs blocks"));

  name = input_line_pointer;
  endc = get_symbol_end ();

  csect = symbol_find_or_make (name);

  *input_line_pointer = endc;

  sym = symbol_make (".bs");
S_SET_SEGMENT (sym, now_seg); /* should be S_SET_SEGMENT (sym, ppc_coff_debug_section); */
...
...
...

}
/* again for .es */

ppc_es (ignore)
     int ignore ATTRIBUTE_UNUSED;
{
  symbolS *sym;

  if (ppc_current_block == NULL)
    as_bad (_(".es without preceding .bs"));

  sym = symbol_make (".es");
S_SET_SEGMENT (sym, now_seg); /* should be S_SET_SEGMENT (sym, ppc_coff_debug_section); */
...
...
...
}

Sincerely,
        Michael J. Walsh




reply via email to

[Prev in Thread] Current Thread [Next in Thread]