DATA_SEGMENT_ALIGN documentation is not consistent with behaviour

Alan Modra amodra@gmail.com
Wed Nov 4 14:18:00 GMT 2015


This has been incorrect in the docs since 2002.

	PR ld/19203
	* ld.texinfo (DATA_SEGMENT_ALIGN): Correct second expression.

diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index c0da112..1dd7492 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -6108,7 +6108,8 @@ This is equivalent to either
 @end smallexample
 or
 @smallexample
-(ALIGN(@var{maxpagesize}) + (. & (@var{maxpagesize} - @var{commonpagesize})))
+(ALIGN(@var{maxpagesize})
+ + ((. + @var{commonpagesize} - 1) & (@var{maxpagesize} - @var{commonpagesize})))
 @end smallexample
 @noindent
 depending on whether the latter uses fewer @var{commonpagesize} sized pages

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list