Skip to content

Commit

Permalink
Update linker script - eh_frame support
Browse files Browse the repository at this point in the history
Linker script updated to include deffinitions for:
__eh_frame_start, __eh_frame_end, __eh_frame_hdr_start and
__eh_frame_hdr_end symbols.

Change-Id: I6be191d3d6b2a28b13881ed1b1b2c5d68c0a37b4
  • Loading branch information
Milica Lazarevic committed Sep 16, 2024
1 parent 1972341 commit 5c21fac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libgloss/mips/mti32.ld
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ SECTIONS
.eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
.eh_frame :
{
__eh_frame_start = .;
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
__eh_frame_end = .;
}
__eh_frame_hdr_start = SIZEOF(.eh_frame_hdr) > 0 ? ADDR(.eh_frame_hdr) : 0;
__eh_frame_hdr_end = SIZEOF(.eh_frame_hdr) > 0 ? . : 0;
.gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) }
.gnu_extab : { *(.gnu_extab .gnu_extab.*) }
.jcr : { KEEP (*(.jcr)) }
Expand Down
6 changes: 5 additions & 1 deletion libgloss/mips/uhi32.ld
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
__entry = DEFINED(__reset_vector) ? 0xbfc00000 : _start;
ENTRY(__entry)
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips")
GROUP(-lc -luhi -lgcc -lhal)
GROUP(-lc -luhi -lhal)
SEARCH_DIR(.)
__DYNAMIC = 0;
STARTUP(crt0.o)
Expand Down Expand Up @@ -183,11 +183,15 @@ SECTIONS
.eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
.eh_frame :
{
__eh_frame_start = .;
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
__eh_frame_end = .;
}
__eh_frame_hdr_start = SIZEOF(.eh_frame_hdr) > 0 ? ADDR(.eh_frame_hdr) : 0;
__eh_frame_hdr_end = SIZEOF(.eh_frame_hdr) > 0 ? . : 0;

.gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) }
.gnu_extab : { *(.gnu_extab .gnu_extab.*) }
Expand Down

0 comments on commit 5c21fac

Please sign in to comment.