This is the mail archive of the
mailing list for the binutils project.
Re: INPUT_SECTION_FLAGS broken (Was: [RFA] PowerPC VLE port)
- From: Alan Modra <amodra at gmail dot com>
- To: James Lemke <jwlemke at codesourcery dot com>
- Cc: binutils at sourceware dot org, Catherine Moore <clm at codesourcery dot com>, "Maciej W. Rozycki" <macro at codesourcery dot com>, Rhonda Wittels <rhonda at CodeSourcery dot com>
- Date: Wed, 9 May 2012 13:23:50 +0930
- Subject: Re: INPUT_SECTION_FLAGS broken (Was: [RFA] PowerPC VLE port)
- References: <20110813114725.GH19463@bubble.grove.modra.org> <4F47BE0C.firstname.lastname@example.org> <20120301124020.GA3468@bubble.grove.modra.org> <4F8C3A3C.email@example.com> <4F8DAF72.firstname.lastname@example.org> <20120420065128.GT3218@bubble.grove.modra.org> <4F91C623.email@example.com> <20120421044734.GW3218@bubble.grove.modra.org> <20120421064331.GZ3218@bubble.grove.modra.org> <4FA979F0.firstname.lastname@example.org>
On Tue, May 08, 2012 at 03:54:24PM -0400, James Lemke wrote:
> I have incorporated your suggestions regarding section flags.
> Updated patches are attached.
Thanks for your patience. This is OK to commit except
> * elf32-ppc.c (ppc_elf_modify_segment_map): New function.
> (elf_backend_modify_segment_map): Define.
> (has_tls_reloc, has_tls_get_addr_call): Moved out.
Please don't move these flags out of elf32-ppc.c into elf/ppc.h, or
put your new has_vle_insns flag in elf/ppc.h. They don't really
belong there. This too is a little sloppy:
> + /* Disassemble according to the section headers flags for VLE-mode. */
> + if (dialect & PPC_OPCODE_VLE
> + && info->section->has_vle_insns)
> + return dialect;
What if you're disassembling a ppc64 object file where sec_flg2 has a
different meaning? Fix this by passing info->section to a predicate
function living in elf32-ppc.c something along the lines of
is_ppc_vle (asection *sec)
return (sec->owner != NULL
&& is_ppc_elf (sec->owner)
Declare in, I dunno, elf32-ppc.h preferably but this will require
you to pull other headers into ppc-dis.h. elf-bfd.h as a last resort.
-/* This bit is reserved by BFD for processor specific stuff. Name
- it properly so that we can easily stay consistent elsewhere. */
-#define SEC_PPC_VLE SEC_TIC54X_BLOCK
went quite a while ago, which you'll discover when you try to commit
the patch. Please fix corresponding changelog.
There are a few other things that need tidying but we can address them
once you've committed your patch.
Australia Development Lab, IBM