Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e6c3790

Browse files
Remove .got section again
It seems that whatever bug or config mistake gave us .got entries back then has since been resolved. Also add a sanity check to recognize should this happen again.
1 parent bb2f1c7 commit e6c3790

File tree

50 files changed

+201
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+201
-70
lines changed

‎02_runtime_init/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ objdump: $(KERNEL_ELF)
181181
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
182182
--section .text \
183183
--section .rodata \
184-
--section .got \
185184
$(KERNEL_ELF) | rustfilt
186185

187186
##------------------------------------------------------------------------------

‎02_runtime_init/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@ diff -uNr 01_wait_forever/Cargo.toml 02_runtime_init/Cargo.toml
5252
diff -uNr 01_wait_forever/Makefile 02_runtime_init/Makefile
5353
--- 01_wait_forever/Makefile
5454
+++ 02_runtime_init/Makefile
55-
@@ -180,6 +180,8 @@
55+
@@ -180,6 +180,7 @@
5656
$(call color_header, "Launching objdump")
5757
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
5858
--section .text \
5959
+ --section .rodata \
60-
+ --section .got \
6160
$(KERNEL_ELF) | rustfilt
6261

6362
##------------------------------------------------------------------------------
@@ -211,7 +210,7 @@ diff -uNr 01_wait_forever/src/bsp/raspberrypi/kernel.ld 02_runtime_init/src/bsp/
211210
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
212211
__rpi_phys_binary_load_addr = 0x80000;
213212

214-
@@ -13,21 +15,58 @@
213+
@@ -13,21 +15,65 @@
215214
* 4 == R
216215
* 5 == RX
217216
* 6 == RW
@@ -257,7 +256,6 @@ diff -uNr 01_wait_forever/src/bsp/raspberrypi/kernel.ld 02_runtime_init/src/bsp/
257256
} :segment_code
258257
+
259258
+ .rodata : ALIGN(8) { *(.rodata*) } :segment_code
260-
+ .got : ALIGN(8) { *(.got) } :segment_code
261259
+
262260
+ /***********************************************************************************************
263261
+ * Data + BSS
@@ -272,6 +270,14 @@ diff -uNr 01_wait_forever/src/bsp/raspberrypi/kernel.ld 02_runtime_init/src/bsp/
272270
+ . = ALIGN(16);
273271
+ __bss_end_exclusive = .;
274272
+ } :segment_data
273+
+
274+
+ /***********************************************************************************************
275+
+ * Misc
276+
+ ***********************************************************************************************/
277+
+ .got : { *(.got*) }
278+
+ ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
279+
+
280+
+ /DISCARD/ : { *(.comment*) }
275281
}
276282

277283
diff -uNr 01_wait_forever/src/bsp/raspberrypi.rs 02_runtime_init/src/bsp/raspberrypi.rs

‎02_runtime_init/src/bsp/raspberrypi/kernel.ld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ SECTIONS
5454
} :segment_code
5555

5656
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
57-
.got : ALIGN(8) { *(.got) } :segment_code
5857

5958
/***********************************************************************************************
6059
* Data + BSS
@@ -69,4 +68,12 @@ SECTIONS
6968
. = ALIGN(16);
7069
__bss_end_exclusive = .;
7170
} :segment_data
71+
72+
/***********************************************************************************************
73+
* Misc
74+
***********************************************************************************************/
75+
.got : { *(.got*) }
76+
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
77+
78+
/DISCARD/ : { *(.comment*) }
7279
}

‎03_hacky_hello_world/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ objdump: $(KERNEL_ELF)
184184
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
185185
--section .text \
186186
--section .rodata \
187-
--section .got \
188187
$(KERNEL_ELF) | rustfilt
189188

190189
##------------------------------------------------------------------------------

‎03_hacky_hello_world/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
9595

9696

9797

98-
@@ -191,3 +194,27 @@
98+
@@ -190,3 +193,27 @@
9999
$(call color_header, "Launching nm")
100100
@$(DOCKER_TOOLS) $(NM_BINARY) --demangle --print-size $(KERNEL_ELF) | sort | rustfilt
101101

‎03_hacky_hello_world/src/bsp/raspberrypi/kernel.ld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ SECTIONS
5454
} :segment_code
5555

5656
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
57-
.got : ALIGN(8) { *(.got) } :segment_code
5857

5958
/***********************************************************************************************
6059
* Data + BSS
@@ -69,4 +68,12 @@ SECTIONS
6968
. = ALIGN(16);
7069
__bss_end_exclusive = .;
7170
} :segment_data
71+
72+
/***********************************************************************************************
73+
* Misc
74+
***********************************************************************************************/
75+
.got : { *(.got*) }
76+
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
77+
78+
/DISCARD/ : { *(.comment*) }
7279
}

‎04_safe_globals/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ objdump: $(KERNEL_ELF)
184184
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
185185
--section .text \
186186
--section .rodata \
187-
--section .got \
188187
$(KERNEL_ELF) | rustfilt
189188

190189
##------------------------------------------------------------------------------

‎04_safe_globals/src/bsp/raspberrypi/kernel.ld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ SECTIONS
5454
} :segment_code
5555

5656
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
57-
.got : ALIGN(8) { *(.got) } :segment_code
5857

5958
/***********************************************************************************************
6059
* Data + BSS
@@ -69,4 +68,12 @@ SECTIONS
6968
. = ALIGN(16);
7069
__bss_end_exclusive = .;
7170
} :segment_data
71+
72+
/***********************************************************************************************
73+
* Misc
74+
***********************************************************************************************/
75+
.got : { *(.got*) }
76+
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
77+
78+
/DISCARD/ : { *(.comment*) }
7279
}

‎05_drivers_gpio_uart/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ objdump: $(KERNEL_ELF)
203203
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
204204
--section .text \
205205
--section .rodata \
206-
--section .got \
207206
$(KERNEL_ELF) | rustfilt
208207

209208
##------------------------------------------------------------------------------

‎05_drivers_gpio_uart/src/bsp/raspberrypi/kernel.ld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ SECTIONS
5454
} :segment_code
5555

5656
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
57-
.got : ALIGN(8) { *(.got) } :segment_code
5857

5958
/***********************************************************************************************
6059
* Data + BSS
@@ -69,4 +68,12 @@ SECTIONS
6968
. = ALIGN(16);
7069
__bss_end_exclusive = .;
7170
} :segment_data
71+
72+
/***********************************************************************************************
73+
* Misc
74+
***********************************************************************************************/
75+
.got : { *(.got*) }
76+
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
77+
78+
/DISCARD/ : { *(.comment*) }
7279
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /