This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix Alpha gas .{text,data} .previous handling


Hi!

Dunno why glibc worked on Alpha with binutils lately, certainly it doesn't
work now.
The problem is that gas doesn't handle:

.text
nop
.data
.quad 0
.previous
nop

properly on Alpha:

./as-new test.s
test.s: Assembler messages:
test.s:5: Warning: .previous without corresponding .section; ignored

and the result is:

a.out:     file format elf64-alpha

Disassembly of section .text:

0000000000000000 <.text>:
   0:   1f 04 ff 47     nop

With the patch below, I get no warnings and the expected 

a.out:     file format elf64-alpha

Disassembly of section .text:

0000000000000000 <.text>:
   0:   1f 04 ff 47     nop
   4:   1f 04 ff 47     nop

output.
Ok to commit?
Daniel, I know you have closed 2.12 branch already, but couldn't this be
considered for 2.12 still? I find it very severe.

2002-02-27  Jakub Jelinek  <jakub@redhat.com>

	* config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not
	s_text.
	(s_alpha_data): Use obj_elf_data for OBJ_ELF, not s_data.

--- gas/config/tc-alpha.c.jj	Tue Feb 12 14:59:09 2002
+++ gas/config/tc-alpha.c	Wed Feb 27 11:42:45 2002
@@ -4031,7 +4031,11 @@ s_alpha_text (i)
      int i;
 
 {
+#ifdef OBJ_ELF
+  obj_elf_text (i);
+#else
   s_text (i);
+#endif
   alpha_insn_label = NULL;
   alpha_auto_align_on = 1;
   alpha_current_align = 0;
@@ -4044,7 +4048,11 @@ static void
 s_alpha_data (i)
      int i;
 {
+#ifdef OBJ_ELF
+  obj_elf_data (i);
+#else
   s_data (i);
+#endif
   alpha_insn_label = NULL;
   alpha_auto_align_on = 1;
   alpha_current_align = 0;


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]