[Bug ld/12374] ld fails to convert global hidden symbols to local ones

2011-02-14 Thread jbeulich at novell dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12374

Jan Beulich jbeulich at novell dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #2 from Jan Beulich jbeulich at novell dot com 2011-02-14 
08:05:14 UTC ---
Indeed, as was clarified on the mailing list.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12488] plugins don't support linkonce

2011-02-14 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12488

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com 2011-02-14 14:48:24 
UTC ---
Is this related to

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-14 Thread dave at hiauly1 dot hia.nrc.ca
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #7 from dave at hiauly1 dot hia.nrc.ca dave at hiauly1 dot 
hia.nrc.ca 2011-02-14 14:51:27 UTC ---
 If they are the same page, doesn't that mean your maxpagesize is wildly
 incorrect?  You must have maxpagesize at least as large as a memory page.

maxpagesize is set to 0x1000 which is the standard page size for parisc
linux.

The issue is not the virtual addresses of the page but the placement
of the loadable segments in the file.  These segments are mmap'd from
the file to physical memory.  Although the pages could be different
in memory, they are not.

The issue can be seen by looking at the mappings for a trivial program like:

int main () { return 0 }

For the the main executable, there is only one file page for text
and data.  Run program under gdb with a break on main.  Then inspect
the mappings.

The two mappings could be made equivalent, but this messes up shared
library support.

The hardware can support larger page sizes, but as far as I know nobody
uses them on linux.  There was some effort to provide support for larger
page sizes in the linux kernel but I don't believe the cache flush and
TLB support is complete.

Possibly, ELF_COMMONPAGESIZE should be defined and ELF_MAXPAGESIZE
increased to the linux kernel maximum.

Dave

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-14 Thread ian at airs dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

Ian Lance Taylor ian at airs dot com changed:

   What|Removed |Added

 CC||ian at airs dot com

--- Comment #8 from Ian Lance Taylor ian at airs dot com 2011-02-14 16:35:25 
UTC ---
It sounds like you are saying that the PA does not operate as most other
processors do.  It seems very odd to me that the PA Linux kernel can not map
the same file page to two different locations in virtual memory.  That is what
the Linux kernel does on other processors.  You are talking about two mappings
to the same physical page, but that is not what the ELF executable is
requesting.  It is requesting two different virtual pages mapping to the same
page in the file.

If that is indeed a limitation of PA Linux, then the only fix is to change the
default linker script so that the first page of the data segment does not
overlap with the last page of the text segment.  The way to do that is to set
DATA_ADDR in the appropriate ld/emulparams file.  For example,

DATA_ADDR=ALIGN(${MAXPAGESIZE})

That should always force the data segment to start on a new page.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-14 Thread dave at hiauly1 dot hia.nrc.ca
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #9 from dave at hiauly1 dot hia.nrc.ca dave at hiauly1 dot 
hia.nrc.ca 2011-02-14 17:26:00 UTC ---
On Mon, 14 Feb 2011, ian at airs dot com wrote:

 If that is indeed a limitation of PA Linux, then the only fix is to change the
 default linker script so that the first page of the data segment does not
 overlap with the last page of the text segment.  The way to do that is to set
 DATA_ADDR in the appropriate ld/emulparams file.  For example,
 
 DATA_ADDR=ALIGN(${MAXPAGESIZE})
 
 That should always force the data segment to start on a new page.

I'll take another look but I think this only changes the virtual address
of the data segment and not the underlying file organization.

Looking at a typical file compiled for hppa64-hpux with readelf, we have:

Program Headers:
  Type   Offset VirtAddr   PhysAddr
   FileSizMemSiz  Flags  Align

  LOAD   0x 0x4000 0x
 0x00024bc8 0x00024bc8  R E8
  LOAD   0x00025000 0x8001 0x
 0x2ef0 0x3550  RW 8

Note the file offset for the data segment starts on a page boundary.
I think that I need to achieve the same on hppa-linux.

Dave

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-14 Thread ian at airs dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #10 from Ian Lance Taylor ian at airs dot com 2011-02-14 21:46:11 
UTC ---
If you arrange for the data section to start on a new page, then the linker
will always put that data section on a new page in the file.  It has to,
because ELF specifies that the file offset is always equal to the page offset
modulo the page size (unless you link with -N or -n).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-14 Thread dave at hiauly1 dot hia.nrc.ca
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #11 from dave at hiauly1 dot hia.nrc.ca dave at hiauly1 dot 
hia.nrc.ca 2011-02-14 23:22:20 UTC ---
On Mon, 14 Feb 2011, ian at airs dot com wrote:

 If you arrange for the data section to start on a new page, then the linker
 will always put that data section on a new page in the file.  It has to,
 because ELF specifies that the file offset is always equal to the page offset
 modulo the page size (unless you link with -N or -n).

Ah, that's the clue!  Testing fix.

Dave

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils