Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relocatable] 8: Silence ld warnings in shared builds of backends #163

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ otherlibs/unix/symlink_win32.c typo.long-line
utils/misc.ml typo.utf8
runtime/sak.c typo.non-ascii

stdlib/hashbang typo.white-at-eol typo.missing-lf

testsuite/tests/** typo.missing-header typo.long-line=may
testsuite/tests/lib-bigarray-2/bigarrf.f typo.tab linguist-language=Fortran
testsuite/tests/lib-unix/win-stat/fakeclock.c typo.missing-header=false
Expand Down
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ ___________
runtime assertions.
(Antonin Décimo, review by Miod Vallat, Gabriel Scherer, and David Allsopp)

- #13496: Add missing .type and .size directives to main frametable to silence
warnings from the linker when using libasmrun_shared on amd64 and power. The
other backends already carried these directives.
(David Allsopp, review by ???)

### Code generation and optimizations:

- #13014: Enable compile-time option -function-sections on all previously
Expand Down
5 changes: 5 additions & 0 deletions runtime/amd64.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@
#if defined(SYS_linux) || defined(SYS_gnu)
#define ENDFUNCTION(name) \
.size name, . - name
#define ENDOBJECT(name) \
.type name, @object; \
.size name, . - name;
#else
#define ENDFUNCTION(name)
#define ENDOBJECT(name)
#endif

#include "../runtime/caml/asm.h"
Expand Down Expand Up @@ -1331,6 +1335,7 @@ G(caml_system.frametable):
.quad LBL(frame_runstack) /* return address into fiber_val_handler */
.value -1 /* negative frame size => use callback link */
.value 0 /* no roots here */
ENDOBJECT(G(caml_system.frametable))

#if defined(SYS_macosx)
.literal16
Expand Down
1 change: 1 addition & 0 deletions runtime/power.S
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ caml_system.frametable:
.short -1 /* negative frame size => use callback link */
.short 0 /* no roots here */
.align 3
.size caml_system.frametable, .-caml_system.frametable

/* TOC entries */

Expand Down
1 change: 0 additions & 1 deletion stdlib/hashbang

This file was deleted.

Loading