This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: binutils gas patch to fix incorrect symbol flags
- To: tdel at windriver dot com
- Subject: Re: binutils gas patch to fix incorrect symbol flags
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 24 Jan 2000 20:56:05 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <388CF552.3E10679A@wrs.com>
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