This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: binutils gas patch to fix incorrect symbol flags


   Date: Mon, 24 Jan 2000 16:58:58 -0800
   From: Thomas de Lellis <tdel@windriver.com>

   Objdump was found to be dumping raw hex bytes in the disassembly
   listing. The problem was traced back to symbol flags being set
   incorrectly in the assembler for labels in code sections. The
   routine that handles this now attempts to differentiate between
   code and data sections when setting flags.

I don't mind changing this for the PowerPC only, because the PowerPC
code already sets the symbol type for all symbols, apparently to
pacify VxWorks.

But it's the wrong approach for ELF in general, so this patch should
not remove the #ifdef TC_PPC.

ELF symbols should only have a type if the assembler source indicates
that they should have a type, using the .type pseudo-op.  Otherwise,
they should have type STT_NOTYPE.

If you are encountering problems for a target other than the PowerPC,
then the correct fix is to patch the compiler or your assembler
sources.

Also, the patch should probably use subseg_text_p rather than checking
directly for SEC_CODE.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]