Patches for gas-960206
H.J. Lu
hjl@zoom.com
Thu Feb 15 00:09:00 GMT 1996
These patches fixed a few bugs in gas-960206:
1. Failed to update/generate bfd-in2.h, libbfd.h, libcoff.h when
$srcdir != "."
2. Fix LynxOS targets.
3. Swap chmod/chown.
4. libopcodes.so depends on libbfd.so. But gas for x86 doesn't need
it.
5. Fix elf.sc for Linux.
H.J.
---
Index: bfd/Makefile.in
===================================================================
RCS file: /home/cvs/gnu/binutils/bfd/Makefile.in,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 Makefile.in
*** Makefile.in 1996/02/07 05:02:18 1.1.1.10
--- Makefile.in 1996/02/07 06:12:39
***************
*** 721,735 ****
# The rules for the generated header files are here so that people can
# type `make bfd-in2.h' if they remove it. They are not run by default.
! bfd-in2.h:
(cd $(docdir); $(MAKE) bfd.h $(FLAGS_TO_PASS))
cp $(docdir)/bfd.h bfd-in2.h-new
$(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
! libbfd.h:
(cd $(docdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS))
cp $(docdir)/libbfd.h libbfd.h-new
$(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
! libcoff.h:
(cd $(docdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS))
cp $(docdir)/libcoff.h libcoff.h-new
$(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
--- 721,735 ----
# The rules for the generated header files are here so that people can
# type `make bfd-in2.h' if they remove it. They are not run by default.
! $(srcdir)/bfd-in2.h:
(cd $(docdir); $(MAKE) bfd.h $(FLAGS_TO_PASS))
cp $(docdir)/bfd.h bfd-in2.h-new
$(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
! $(srcdir)/libbfd.h:
(cd $(docdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS))
cp $(docdir)/libbfd.h libbfd.h-new
$(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
! $(srcdir)/libcoff.h:
(cd $(docdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS))
cp $(docdir)/libcoff.h libcoff.h-new
$(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
Index: bfd/configure.in
===================================================================
RCS file: /home/cvs/gnu/binutils/bfd/configure.in,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 configure.in
*** configure.in 1996/02/07 05:02:32 1.1.1.10
--- configure.in 1996/02/07 05:20:12
***************
*** 373,378 ****
--- 373,393 ----
*) f="$f $i" ;;
esac
done
+
+ # Lynx is a very different animal. We cannot support straight a.out
+ # nor coff anymore. We have to strip them out.
+ for cpu in i386 m68k sparc
+ do
+ for fmt in aout coff
+ do
+ case $f in
+ *${cpu}lynx_${fmt}_vec*)
+ f=`echo $f | sed -e "s/${cpu}${fmt}_vec//g"`
+ ;;
+ esac
+ done
+ done
+
selvecs="$f"
# uniq the architectures in all the configured targets.
Index: gas/configure
===================================================================
RCS file: /home/cvs/gnu/binutils/gas/configure,v
retrieving revision 1.1.1.14
diff -c -r1.1.1.14 configure
*** configure 1996/02/07 05:00:42 1.1.1.14
--- configure 1996/02/07 08:15:34
***************
*** 697,707 ****
# do we need the opcodes library?
case ${cpu_type} in
! alpha | vax)
;;
*)
OPCODES_DEP=../opcodes/libopcodes.a
OPCODES_LIB='-L../opcodes -lopcodes'
;;
esac
--- 697,709 ----
# do we need the opcodes library?
case ${cpu_type} in
! alpha | i386 | vax)
;;
*)
OPCODES_DEP=../opcodes/libopcodes.a
OPCODES_LIB='-L../opcodes -lopcodes'
+ # libopcodes.so needs libbfd.so.
+ need_bfd=yes
;;
esac
Index: gas/configure.in
===================================================================
RCS file: /home/cvs/gnu/binutils/gas/configure.in,v
retrieving revision 1.1.1.15
diff -c -r1.1.1.15 configure.in
*** configure.in 1996/02/07 05:00:42 1.1.1.15
--- configure.in 1996/02/07 08:15:26
***************
*** 61,71 ****
# do we need the opcodes library?
case ${cpu_type} in
! alpha | vax)
;;
*)
OPCODES_DEP=../opcodes/libopcodes.a
OPCODES_LIB='-L../opcodes -lopcodes'
;;
esac
AC_SUBST(OPCODES_DEP)
--- 61,73 ----
# do we need the opcodes library?
case ${cpu_type} in
! alpha | i386 | vax)
;;
*)
OPCODES_DEP=../opcodes/libopcodes.a
OPCODES_LIB='-L../opcodes -lopcodes'
+ # libopcodes.so needs libbfd.so.
+ need_bfd=yes
;;
esac
AC_SUBST(OPCODES_DEP)
Index: binutils/objcopy.c
===================================================================
RCS file: /home/cvs/gnu/binutils/binutils/objcopy.c,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 objcopy.c
*** objcopy.c 1996/02/01 06:50:17 1.1.1.10
--- objcopy.c 1996/02/01 07:26:22
***************
*** 1403,1410 ****
if (ret == 0)
{
/* Try to preserve the permission bits and ownership of TO. */
- chmod (to, s.st_mode & 07777);
chown (to, s.st_uid, s.st_gid);
}
else
{
--- 1403,1410 ----
if (ret == 0)
{
/* Try to preserve the permission bits and ownership of TO. */
chown (to, s.st_uid, s.st_gid);
+ chmod (to, s.st_mode & 07777);
}
else
{
Index: ld/scripttempl/elf.sc
===================================================================
RCS file: /home/cvs/gnu/binutils/ld/scripttempl/elf.sc,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 elf.sc
*** elf.sc 1996/02/01 06:50:51 1.1.1.4
--- elf.sc 1996/02/01 06:54:03
***************
*** 26,31 ****
--- 26,38 ----
test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+ case ${target_alias} in
+ *linux*)
+ DATA_ALIGN="${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + ((ALIGN(8) + ${MAXPAGESIZE} - ALIGN(${MAXPAGESIZE})) & (${MAXPAGESIZE} - 1))}"
+ ;;
+ *)
+ DATA_ALIGN="${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}}"
+ esac
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
"${LITTLE_OUTPUT_FORMAT}")
***************
*** 99,105 ****
important than losing a page of the virtual address space (note
that no actual memory is lost; the page which is skipped can not
be referenced). */
! ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
.data ${RELOCATING-0} :
{
--- 106,112 ----
important than losing a page of the virtual address space (note
that no actual memory is lost; the page which is skipped can not
be referenced). */
! ${RELOCATING+. = ${DATA_ALIGN};}
.data ${RELOCATING-0} :
{
More information about the Gas2
mailing list