[Bug gas/3054] New: unknown architecture `ep9312'

2006-08-15 Thread mkl at pengutronix dot de
We're using the binutils snapshot from 060815
(ftp://sources.redhat.com/pub/binutils/snapshots/) and have a problem building a
crosscompiler from i686 to arm-ep93 with crunch support.

gcc is configured with "--with-arch=ep9312" which is valid for gcc. During the
build, "as" complains about "unknown architecture `ep9312'"

[EMAIL 
PROTECTED]:~/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1-first-build/gcc]$
./xgcc -B./
-B/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux-gnueabi/bin/
-isystem
/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux-gnueabi/include
-isystem
/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux-gnueabi/sys-include
-L/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1-first-build/gcc/../ld
-O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/.
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/../include
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/../libcpp/include
g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time -c
/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/crtstuff.c
-DCRT_BEGIN -o crtbegin.o -v
Reading specs from ./specs
Target: arm-ep93xx_maverick-linux-gnueabi
Configured with:
/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/configure
--host=i686-host-linux-gnu --target=arm-ep93xx_maverick-linux-gnueabi
--prefix=/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4
--with-sysroot=/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/sysroot-arm-ep93xx_maverick-linux-gnueabi
--with-arch=ep9312 --with-float=hard --with-fpu=maverick --disable-nls
--enable-symvers=gnu --enable-__cxa_atexit --disable-multilib --disable-shared
--enable-threads=no --enable-languages=c
Thread model: single
gcc version 4.1.1
 ./cc1 -quiet -v -I. -I.
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/.
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/../include
-I/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/../libcpp/include
-iprefix
/ptx/work/mkl/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1-first-build/gcc/../lib/gcc/arm-ep93xx_maverick-linux-gnueabi/4.1.1/
-isystem ./include -DIN_GCC -DCROSS_COMPILE -DCRT_BEGIN -isystem
/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux-
gnueabi/include -isystem
/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux-gnueabi/sys-include
-isystem ./include
/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/crtstuff.c
-quiet -dumpbase
 crtstuff.c -march=ep9312 -mfloat-abi=hard -mfpu=maverick -auxbase-strip
crtbegin.o -g0 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized
-in-bss -fno-unit-at-a-time -o /tmp/cc42UfJI.s
ignoring nonexistent directory
"/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/arm-ep93xx_maverick-linux
-gnueabi/sys-include"
ignoring duplicate directory "./include"
ignoring nonexistent directory
"/ptx/work/mkl/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1-first-build/gcc/../lib/gcc/arm-ep93xx_ma
verick-linux-gnueabi/4.1.1/include"
ignoring nonexistent directory
"/ptx/work/mkl/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1-first-build/gcc/../lib/gcc/arm-ep93xx_ma
verick-linux-gnueabi/4.1.1/../../../../arm-ep93xx_maverick-linux-gnueabi/include"
ignoring nonexistent directory
"/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/sysroot-arm-ep93xx_maveri
ck-linux-gnueabi/usr/local/include"
ignoring nonexistent directory
"/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/lib/gcc/arm-ep93xx_maveri
ck-linux-gnueabi/4.1.1/include"
ignoring duplicate directory
"/opt/ptxdist-0.10.svn-mkl/arm-ep93xx_maverick-linux-gnueabi/gcc-4.1.1-glibc-2.4/lib/../arm-ep93xx_maverick-
linux-gnueabi/include"
ignoring duplicate directory "."
ignoring duplicate directory
"/home/mkl/pengutronix/ptxdist/build/toolchain-ep93/build-cross/gcc-4.1.1/gcc/."
#include "..." search starts here:
#include <...> search starts here:
 .
 /home/mkl/pengutronix/ptxdist/build/toolchain-ep9

[Bug gas/3054] unknown architecture `ep9312'

2006-08-15 Thread mkl at pengutronix dot de


-- 
   What|Removed |Added

 CC||r dot schwebel at
   ||pengutronix dot de


http://sourceware.org/bugzilla/show_bug.cgi?id=3054

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug gas/3054] unknown architecture `ep9312'

2006-08-15 Thread mkl at pengutronix dot de

--- Additional Comments From mkl at pengutronix dot de  2006-08-15 09:19 
---
To be more specific:

the binutils cross-build is successful. the gcc cross-build fails...

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3054

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


latest release

2006-08-15 Thread George White
The web page indicates that the latest release is 2.14, but the latest
is really 2.17.

When gcc 4.x is built with the linker in binutils 2.14 and emacs is
built from the result, emacs crashes with a segv, which is corrected by
using the '-z nocombreloc' switch.  When the linker from 2.17 is used,
the problem no longer occurs.

Please correct the web page to point to the more recent version in
order to prevent others from running into this same problem.

This problem occurred on a fully patched solaris 9 x86 machine, so
'keeping my distribution of linux up to date' is not an option.  Also,
as of gcc 4.0, it appears that the gnu linker must be used, so
this may also be a problem with sparc builds.

Regards,

George White



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


[Bug binutils/3039] Compile fails (file wrstabs.c)

2006-08-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2006-08-15 11:59 
---
Created an attachment (id=1225)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1225&action=view)
Initialize 'size'


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3039

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug binutils/3039] Compile fails (file wrstabs.c)

2006-08-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2006-08-15 12:00 
---
Hi Yurii,

  Thanks for reporting this problem.  It is easily solved by initializing the
size variable, so I am going to apply the uploaded patch to the sources along
with this ChangeLog entry.

Cheers
  Nick

binutils/ChangeLog
2006-08-15  Nick Clifton  <[EMAIL PROTECTED]>

PR binutils/3039
* wrstabs.c (stab_tag_type): Initialize 'size'.


-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=3039

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


Re: latest release

2006-08-15 Thread Nick Clifton

Hi George,


The web page indicates that the latest release is 2.14, but the latest
is really 2.17.


Which web page ?  Both

  http://www.gnu.org/software/binutils/binutils.html

and

  http://sourcewa\re.org/binutils/

Indicate that the latest release is 2.17.


Cheers
  Nick


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


[Bug gas/2946] jmp to a weak symbol jumps to a wrong address

2006-08-15 Thread ajocksch at redhat dot com


-- 
   What|Removed |Added

  BugsThisDependsOn||3071


http://sourceware.org/bugzilla/show_bug.cgi?id=2946

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug gas/2946] jmp to a weak symbol jumps to a wrong address

2006-08-15 Thread ajocksch at redhat dot com


-- 
   What|Removed |Added

  BugsThisDependsOn|3071|


http://sourceware.org/bugzilla/show_bug.cgi?id=2946

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug ld/3015] -z relro may create PT_NULL segment

2006-08-15 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2006-08-15 18:55 ---
Well, my patch is incorrect. It isn't easy to remove the PT_NULL segment.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3015

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug ld/3052] ld lma assignment change breaks x86-64 Linux 2.6 kernel

2006-08-15 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2006-08-15 21:35 ---
The linker script in question:

  .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) +
SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) }
  __vsyscall_0 = LOADADDR(.vsyscall_0);
  . = ALIGN(64);
  .xtime_lock : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63))
{ *(.xtime_lock) }
  xtime_lock = LOADADDR(.xtime_lock);
  . = ALIGN(16);
  .vxtime : AT ((LOADADDR(.xtime_lock) + SIZEOF(.xtime_lock) + 15) & ~(15)) {
*(.vxtime) }
  vxtime = LOADADDR(.vxtime);
  . = ALIGN(16);
  .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) {
*(.wall_jiffies) }
  wall_jiffies = LOADADDR(.wall_jiffies);
  . = ALIGN(16);
  .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15))
{ *(.sys_tz) }
  sys_tz = LOADADDR(.sys_tz);
  . = ALIGN(16);
  .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) {
*(.sysctl_vsyscall) }
  sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
  . = ALIGN(16);
  .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) &
~(15)) { *(.jiffies) }
  jiffies = LOADADDR(.jiffies);
  . = ALIGN(16);
  .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { 
*(.xtime) }
  xtime = LOADADDR(.xtime);
  .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT (LOADADDR(.vsyscall_0) + 1024) {
*(.vsyscall_1) }
  . = LOADADDR(.vsyscall_0) + 4096;

  . = ALIGN(8192); /* init_task */
  .data.init_task : { *(.data.init_task) }

The resulting sections should be

  [14] .data.cacheline_a PROGBITS804dd500 4dd500 009600 00  WA 
0   0 128
  [15] .vsyscall_0   PROGBITSff60 60 000103 00  AX 
0   0  1
  [16] .xtime_lock   PROGBITSff600140 600140 0c 00  WA 
0   0 64
  [17] .vxtime   PROGBITSff600150 600150 38 00  WA 
0   0 16
  [18] .wall_jiffies PROGBITSff600190 600190 08 00  WA 
0   0 16
  [19] .sys_tz   PROGBITSff6001a0 6001a0 08 00  WA 
0   0 16
  [20] .sysctl_vsyscall  PROGBITSff6001b0 6001b0 04 00  WA 
0   0 16
  [21] .jiffies  PROGBITSff6001c0 6001c0 08 00  WA 
0   0 16
  [22] .xtimePROGBITSff6001d0 6001d0 10 00  WA 
0   0 16
  [23] .vsyscall_1   PROGBITSff600400 600400 28 00  AX 
0   0  1
  [24] .data.init_task   PROGBITS804e8000 6e8000 003000 00  WA 
0   0 32

This change:

last = r->last_os->output_section_statement.bfd_section; 
/* If the current vma overlaps the previous section,
   then set the current lma to that at the end of
   the previous section.  The previous section was
   probably an overlay.  */
if ((dot >= last->vma
 && dot < last->vma + last->size)
|| (last->vma >= dot
&& last->vma < dot + os->bfd_section->size))
  lma = last->lma + last->size;

/* Otherwise, keep the same lma to vma relationship
   as the previous section.  */
else
  lma = dot + last->lma - last->vma;

if (os->section_alignment != -1)
  lma = align_power (lma, os->section_alignment);
os->bfd_section->lma = lma;

mishandles it.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3052

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug ld/3052] ld lma assignment change breaks x86-64 Linux 2.6 kernel

2006-08-15 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2006-08-15 21:53 ---
This change

--- ldlang.c.foo2006-08-15 14:53:05.0 -0700
+++ ldlang.c2006-08-15 14:44:19.0 -0700
@@ -4742,11 +4742,14 @@ lang_do_assignments_1 (lang_statement_un
|| (last->vma >= dot
&& last->vma < dot + os->bfd_section->size))
  lma = last->lma + last->size;
-
+   else
+ lma = dot;
+#if 0
/* Otherwise, keep the same lma to vma relationship
   as the previous section.  */
else
  lma = dot + last->lma - last->vma;
+#endif

if (os->section_alignment != -1)
  lma = align_power (lma, os->section_alignment);

seems to generate a working kernel.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3052

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug ld/3052] ld lma assignment change breaks x86-64 Linux 2.6 kernel

2006-08-15 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2006-08-16 00:39 ---
The lma values set by lang_do_assignments_1 are used for
_bfd_elf_map_sections_to_segments and those lma values later
are overridden by lang_size_sections_1 with a different logic.
The values set up by lang_do_assignments_1 may incorrect.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3052

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug ld/3052] ld lma assignment change breaks x86-64 Linux 2.6 kernel

2006-08-15 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2006-08-16 01:07 ---
Created an attachment (id=1226)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1226&action=view)
A testcase

Here is a testcase. old.sec has the dump from the correct output:

[EMAIL PROTECTED] lma]$ make LD=ld
as   -o foo.o foo.s
ld -o foo -T foo.t foo.o
readelf -S -l --wide foo > foo.sec
diff -up foo.sec old.sec
--- foo.sec 2006-08-15 18:07:37.0 -0700
+++ old.sec 2006-08-15 18:04:38.0 -0700
@@ -1,15 +1,15 @@
-There are 8 section headers, starting at offset 0x400058:
+There are 8 section headers, starting at offset 0x302058:

 Section Headers:
   [Nr] Name  TypeAddress  OffSize   ES Flg
Lk Inf Al
   [ 0]   NULL 00 00 00
 0   0  0
-  [ 1] .text PROGBITS8010 30 01 00  AX
 0   0  4
-  [ 2] .data.cacheline_a PROGBITS80100040 300040 01 00  WA
 0   0  1
-  [ 3] .vsyscall_0   PROGBITSff60 40 01 00  AX
 0   0  1
-  [ 4] .data.init_task   PROGBITS80102000 102000 01 00  WA
 0   0  1
-  [ 5] .shstrtab STRTAB   41 55 00
 0   0  1
-  [ 6] .symtab   SYMTAB   400258 78 18
 7   5  8
-  [ 7] .strtab   STRTAB   4002d0 01 00
 0   0  1
+  [ 1] .text PROGBITS8010 10 01 00  AX
 0   0  4
+  [ 2] .data.cacheline_a PROGBITS80100040 100040 01 00  WA
 0   0  1
+  [ 3] .vsyscall_0   PROGBITSff60 20 01 00  AX
 0   0  1
+  [ 4] .data.init_task   PROGBITS80102000 302000 01 00  WA
 0   0  1
+  [ 5] .shstrtab STRTAB   302001 55 00
 0   0  1
+  [ 6] .symtab   SYMTAB   302258 78 18
 7   5  8
+  [ 7] .strtab   STRTAB   3022d0 01 00
 0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
@@ -21,12 +21,12 @@ There are 3 program headers, starting at

 Program Headers:
   Type   Offset   VirtAddr   PhysAddr   FileSiz 
MemSiz   Flg Align
-  LOAD   0x00 0x8000 0x00b01000 0x102001
0x102001 RW  0x20
-  LOAD   0x30 0x8010 0x8010 0x41
0x41 RWE 0x20
-  LOAD   0x40 0xff60 0x80101000 0x01
0x01 R E 0x20
+  LOAD   0x00 0x8000 0x8000 0x100041
0x100041 RWE 0x20
+  LOAD   0x20 0xff60 0x80101000 0x01
0x01 R E 0x20
+  LOAD   0x302000 0x80102000 0x80102000 0x01
0x01 RW  0x20

  Section to Segment mapping:
   Segment Sections...
-   00 .text .data.cacheline_aligned .data.init_task
-   01 .text .data.cacheline_aligned
-   02 .vsyscall_0
+   00 .text .data.cacheline_aligned
+   01 .vsyscall_0
+   02 .data.init_task
make: *** [all] Error 1
[EMAIL PROTECTED] lma]$

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3052

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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