Summary: | PAGE_SIZE redefined in dlltool.c | ||
---|---|---|---|
Product: | binutils | Reporter: | Jerker Bäck <jerker.back> |
Component: | binutils | Assignee: | unassigned |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bug-binutils |
Priority: | P2 | ||
Version: | 2.21 | ||
Target Milestone: | --- | ||
Host: | x86_64-unknown-interix6.1 | Target: | x86_64-unknown-interix6.1 |
Build: | x86_64-unknown-interix6.1 | Last reconfirmed: | |
Attachments: | Solution based on COFF_PAGE_SIZE |
Description
Jerker Bäck
2009-11-24 21:24:00 UTC
Random comment coming out of the woodwork: I can't help thinking that you should change this and all uses to TARGET_PAGE_SIZE and TARGET_PAGE_MASK, and the problem would probably be solved. If you *really* need the host page size...no you don't. *** Bug 11016 has been marked as a duplicate of this bug. *** *** Bug 11014 has been marked as a duplicate of this bug. *** (In reply to comment #1) > Random comment coming out of the woodwork: > I can't help thinking that you should change this and all uses to > TARGET_PAGE_SIZE and TARGET_PAGE_MASK, and the problem would probably be solved. > If you *really* need the host page size...no you don't. That is an idea. TARGET_PAGE_SIZE=0x1000 is set by all targets using dlltool (AFAICS), but it is defined by the ld/emulparams scripts and used only in ld scripts. BTW HOST is TARGET, although dlltool is not currently used by Interix. It favours its own PE shared library solution. Created attachment 4434 [details]
Solution based on COFF_PAGE_SIZE
Antother solution could be to use COFF_PAGE_SIZE. The COFF_PAGE_SIZE define
must then be moved from implementation to header.
Subject: Bug 11017 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2009-12-02 14:04:17 Modified files: include/coff : ChangeLog i386.h x86_64.h bfd : ChangeLog coff-i386.c binutils : ChangeLog dlltool.c Log message: PR binutils/11017 * dlltool.c (PAGE_SIZE): Delete. (PAGE_MASK): Provide default definition based on COFF_PAGE_SIZE. Check for DLLTOOL_DEFAULT_MX86_64 and DLLTOOL_DEFAULT_I386. * coff-i386.h (COFF_PAGE_SIZE): Definition moved to coff/i386.h * i386lh (COFF_PAGE_SIZE): Define. * x86_64.h (COFF_PAGE_SIZE): Define. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/include/coff/ChangeLog.diff?cvsroot=src&r1=1.89&r2=1.90 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/include/coff/i386.h.diff?cvsroot=src&r1=1.3&r2=1.4 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/include/coff/x86_64.h.diff?cvsroot=src&r1=1.1&r2=1.2 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4849&r2=1.4850 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/coff-i386.c.diff?cvsroot=src&r1=1.30&r2=1.31 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1570&r2=1.1571 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/dlltool.c.diff?cvsroot=src&r1=1.97&r2=1.98 Hi Jerker, Thanks for the patch - I have now checked it in. Cheers Nick |