public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: hjl@nynexst.com (H.J. Lu)
To: gas2@cygnus.com
Cc: ian@cygnus.com (Ian Lance Taylor)
Subject: An ld bug?
Date: Mon, 02 Oct 1995 21:00:00 -0000	[thread overview]
Message-ID: <m0szyWb-00011NC@didi.nynexst.com> (raw)

Hi,

It seems gas-950822 doesn't treat common symbols right. Does the newer
snapshot still have this bug? BTW, I tested it under i486-linux.

Thanks.


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com
---
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1995-10-02 23:51 EDT by <hjl@didi>.
# Source directory was `/home/hjl/bugs/ld/common'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#    273 -rw-r--r-- Makefile
#     14 -rw-r--r-- bar.c
#     71 -rw-r--r-- x.c
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
# ============= Makefile ==============
if test -f 'Makefile' && test X"$1" != X"-c"; then
  echo 'x - skipping Makefile (file already exists)'
else
  echo 'x - extracting Makefile (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
SRCS= foo.c bar.c
SRCS= bar.c #foo.c
OBJS=$(SRCS:.c=.o)
AR=ar
CFLAGS=
CC=gcc
RANLIB =ranlib
RANLIB =echo
X
X.c.o:
X	$(CC) $(CFLAGS) -c $<
X
all: f1
X
f1: libbar.a
X	$(CC) -o $@ x.c -L. -lbar
X
libbar.a:$(OBJS)
X	$(AR) ucvr $@ $(OBJS)
X	$(RANLIB) $@
X
clean:
X	-rm -f *.o *.a f1 f2 f3
SHAR_EOF
  $shar_touch -am 1002235095 'Makefile' &&
  chmod 0644 'Makefile' ||
  echo 'restore of Makefile failed'
  shar_count="`wc -c < 'Makefile'`"
  test 273 -eq "$shar_count" ||
    echo "Makefile: original size 273, current size $shar_count"
fi
# ============= bar.c ==============
if test -f 'bar.c' && test X"$1" != X"-c"; then
  echo 'x - skipping bar.c (file already exists)'
else
  echo 'x - extracting bar.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'bar.c' &&
int bar = 10;
SHAR_EOF
  $shar_touch -am 1002223695 'bar.c' &&
  chmod 0644 'bar.c' ||
  echo 'restore of bar.c failed'
  shar_count="`wc -c < 'bar.c'`"
  test 14 -eq "$shar_count" ||
    echo "bar.c: original size 14, current size $shar_count"
fi
# ============= x.c ==============
if test -f 'x.c' && test X"$1" != X"-c"; then
  echo 'x - skipping x.c (file already exists)'
else
  echo 'x - extracting x.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'x.c' &&
#include <stdio.h>
X
int bar;
X
main ()
{
X  printf ("bar: %d\n", bar);
}
SHAR_EOF
  $shar_touch -am 1002224095 'x.c' &&
  chmod 0644 'x.c' ||
  echo 'restore of x.c failed'
  shar_count="`wc -c < 'x.c'`"
  test 71 -eq "$shar_count" ||
    echo "x.c: original size 71, current size $shar_count"
fi
exit 0

             reply	other threads:[~1995-10-02 21:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-02 21:00 H.J. Lu [this message]
1995-10-03  7:25 ` Ian Lance Taylor
1995-10-03  8:20   ` H.J. Lu
1995-10-03  8:43     ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0szyWb-00011NC@didi.nynexst.com \
    --to=hjl@nynexst.com \
    --cc=gas2@cygnus.com \
    --cc=ian@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).