This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [rfa] bfd_elf_sign_extend_vma()
- To: Alan Modra <alan at linuxcare dot com dot au>
- Subject: Re: [rfa] bfd_elf_sign_extend_vma()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 23 Jun 2000 18:35:07 +1000
- CC: BINUTILS Patches <binutils at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions
- References: <Pine.LNX.4.21.0006231810520.13055-100000@front.linuxcare.com.au>
Alan Modra wrote:
>
> On Fri, 23 Jun 2000, Andrew Cagney wrote:
>
> > Its fairly consistent with bfd_elf_get_addr_size() which returns the
> > address size or -1 on error. If you've a better suggestion I'd be
> > interested? I can't throw an error :-)
>
> No, I don't have a better suggestion. I suppose you will just need to
> write "if (bfd_elf_sign_extend_vma () == 1)". ie. don't write
> "... == true" as that infers the function returns a boolean. Someone
> is sure to later decide that "if (looks_like_bool_func () == true)" is bad
> C style and rewrite it as "if (looks_like_bool_func ())"
FYI, I had one thought - add address read/write methods to the BFD
target.
Andrew