From 6b5257c13e4c30638c769a7d5ff723b068ef4040 Mon Sep 17 00:00:00 2001 From: angie Date: Tue, 13 Aug 2024 11:04:20 -0400 Subject: [PATCH] forgor this --- docs/file_format/gp_info.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/file_format/gp_info.md b/docs/file_format/gp_info.md index 1b4fcd8..2f18227 100644 --- a/docs/file_format/gp_info.md +++ b/docs/file_format/gp_info.md @@ -1,5 +1,15 @@ # Gp info +Hold the information to emit a `_gp` (global pointer) symbol for the given +segment. + +The `_gp` symbol is used on MIPS builds that want to use the "small data" +sections. This allows to refences small objects using a single MIPS instruction +instead of two. + +The `_gp` symbol is usually defined as an offset into the start of the first +small section. It is defined this way to maximize the addressable range of this +technique. Both the section and the offset are configurable. Every attribute listed is optional unless explicitly stated.