Skip to contentSkip to conversation

MIPS: compute num_got_entries from .got section's size

PATCH New Gabor Juhos 1 participant 1 message Feb 2, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: compute num_got_entries from .got section's size

The '__got_start' and '__got_end' symbols are used only in the linker script to compute the value of the 'num_got_entries' symbol.

Remove the symbols and use the SIZEOF(.got) command to get the size of the .got section.

Cc Daniel Schwierzeck <[email protected]>
---
 arch/mips/cpu/u-boot.lds |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
arch/mips/cpu/u-boot.lds +2 -4
index 37c9d23..58a49b2 100644
@@ -52,11 +52,11 @@ SECTIONS
 	_gp = ALIGN(16) + 0x7ff0;
 
 	.got : {
-		__got_start = .;
 		*(.got)
-		__got_end = .;
 	}
 
+	num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
+
 	. = ALIGN(4);
 	.sdata : {
 		*(.sdata*)
@@ -69,8 +69,6 @@ SECTIONS
 
 	uboot_end_data = .;
 
-	num_got_entries = (__got_end - __got_start) >> PTR_COUNT_SHIFT;
-
 	. = ALIGN(4);
 	.sbss : {
 		*(.sbss*)
Signature · 1 line
1.7.10