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]

.uleb128 vs .align


	.section	.data,"aw",@progbits
	.align 3
 	.uleb128 0xf
	.align 3
	.4byte	foo

This would do the wrong thing on Alpha, because it would think
that the second .align directive wasn't needed.  (This comes
from trying to emulate OSF/1 auto-alignment crap, and if we 
don't suppress redundant alignments we wind up with one piece
of data per fragment, which is incredibly wasteful.)

Fixed thus.


r~


        * read.c (emit_leb128_expr): Call md_cons_align.

Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.39
diff -c -p -d -r1.39 read.c
*** read.c	2001/05/25 01:59:43	1.39
--- read.c	2001/05/30 23:59:28
*************** emit_leb128_expr (exp, sign)
*** 4419,4424 ****
--- 4419,4429 ----
    if (check_eh_frame (exp, &nbytes))
      abort ();
  
+   /* Let the backend know that subsequent data may be byte aligned.  */
+ #ifdef md_cons_align
+   md_cons_align (1);
+ #endif
+ 
    if (op == O_constant)
      {
        /* If we've got a constant, emit the thing directly right now.  */


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