From 744ef4f8e2d8c9d189105ee8de2dc7d0f1cdd50c Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Thu, 14 May 2020 13:42:17 -0500 Subject: [PATCH] Explain how st_other depends on .localentry Fixes #95. Signed-off-by: Bill Schmidt --- specification/ch_3.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/ch_3.xml b/specification/ch_3.xml index eb04887..6085ab9 100644 --- a/specification/ch_3.xml +++ b/specification/ch_3.xml @@ -473,8 +473,12 @@ my_func: points, even if the global entry point will not be used. (In such a case, the instructions of the global entry setup sequence may optionally be initialized with TRAP instructions.) - A function with an st_other value of 1 is - identified by a .localentry directive with a value of 1. + The value of st_other is determined + from the .localentry directive as follows: If the .localentry + value is 0, the value of st_other is 0. If the .localentry + value is 1, the value of st_other is 1. Otherwise, the value of + st_other is the logarithm (base 2) of the .localentry value. + For very large programs, a 32-bit offset from the TOC base may not suffice to reach all function addresses. In this case, the large program model must be used, and the above sequence is