This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: PATCH: PR ld/5303: splay-tree doesn't support 64bit value on 32bit host


On Wed, Nov 14, 2007 at 09:05:08AM +1030, Alan Modra wrote:
> On Tue, Nov 13, 2007 at 09:18:45AM -0800, H.J. Lu wrote:
> > Current linker is broken on 32bit host with 64bit BFD. The problem
> > is splay-tree doesn't support 64bit value on bit host, but arange-set.c
> > uses splay-tree on bfd_vma. Fixing it isn't easy since splay-tree is
> > also used in gcc. We can't use #ifdef in splay-tree.h in gcc due
> > to lack of #ifdef in gengtype in gcc. This patch will abort the
> > linker if it detects such situation.
> 
> Aborting isn't a solution.  I'll revert Doug's patch in a week or so
> if someone can't find a proper solution, eg. fallback to old scheme
> if splay tree support is inadeqaute.
> 

Here are 2 patches to update splay tree. The idea is to provide both
long and long long interfaces for splay-tree if they are different.
The default interface is the smallest one which can hold a pointer.
Gcc support is tricky since gengtype doesn't support #ifdef. I
have to use splay-tree-default.h and let gcc override it. I will
post a patch for arange-set.c if these 2 patches are approved.

Thanks.


H.J.

Attachment: gcc-longlong-1.patch
Description: Text document

Attachment: src-ll-1.patch
Description: Text document


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