summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gas
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-06-15 10:28:50 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-06-15 10:28:50 +0000
commit055dbc328425b51764bc7715b529c23ed171a815 (patch)
tree4b0419f43bfea79caff3e020e160a5138bc3b3ae /gnu/usr.bin/gas
parentc0ed895351aab51857781332eb97cff35fae2a0e (diff)
Fix thoroughly broken PIC code.
This removes arbitrary restrictions on label lengths for PIC code.
Diffstat (limited to 'gnu/usr.bin/gas')
-rw-r--r--gnu/usr.bin/gas/config/tc-i386.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/usr.bin/gas/config/tc-i386.c b/gnu/usr.bin/gas/config/tc-i386.c
index 431350284c6..b76656d4b0c 100644
--- a/gnu/usr.bin/gas/config/tc-i386.c
+++ b/gnu/usr.bin/gas/config/tc-i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc-i386.c,v 1.6 1999/04/30 23:07:41 espie Exp $ */
+/* $OpenBSD: tc-i386.c,v 1.7 1999/06/15 10:28:49 espie Exp $ */
/* i386.c -- Assemble code for the Intel 80386
Copyright (C) 1989, 1991, 1992 Free Software Foundation.
@@ -27,7 +27,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.6 1999/04/30 23:07:41 espie Exp $";
+static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.7 1999/06/15 10:28:49 espie Exp $";
#endif
#include "as.h"
@@ -1366,6 +1366,7 @@ static int i386_operand (operand_string)
char *operand_string;
{
register char *op_string = operand_string;
+ char *tmpbuf = 0;
/* Address of '\0' at end of operand_string. */
char * end_of_operand_string = operand_string + strlen(operand_string);
@@ -1641,7 +1642,7 @@ char *operand_string;
register char *cp;
if (picmode &&
(cp = strchr(input_line_pointer,'@'))) {
- char tmpbuf[BUFSIZ];
+ tmpbuf= xmalloc(strlen(input_line_pointer));
if (strncmp(cp+1, "PLT", 3) == 0) {
i.disp_reloc[this_operand] = RELOC_JMP_TBL;
@@ -1676,6 +1677,8 @@ char *operand_string;
as_bad("Ignoring junk '%s' after expression",input_line_pointer);
RESTORE_END_STRING (displacement_string_end);
input_line_pointer = save_input_line_pointer;
+ free(tmpbuf);
+ tmpbuf = 0;
switch (exp_seg) {
case SEG_ABSENT:
/* missing expr becomes absolute 0 */