diff options
author | Chris Johns <chrisj@rtems.org> | 2023-08-21 11:15:13 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2023-08-27 07:31:49 +1000 |
commit | b9f11607b1731bc5f2391653cd8f4ebe48ba278e (patch) | |
tree | 1d466a0a7667bbb7c1b66286e6e0fdd84a1ddec6 /cpukit/libdl/rtl-alloc-heap.c | |
parent | spec/testsuite/dl: Fix optimization flags (diff) | |
download | rtems-b9f11607b1731bc5f2391653cd8f4ebe48ba278e.tar.bz2 |
libdl: Realloc text memory if there are trampolines
- Add resize to the allocator interface
- Rework the trampoline variables in the obj struct
to make better sense of what is happening
Closes #4944
Diffstat (limited to 'cpukit/libdl/rtl-alloc-heap.c')
-rw-r--r-- | cpukit/libdl/rtl-alloc-heap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libdl/rtl-alloc-heap.c b/cpukit/libdl/rtl-alloc-heap.c index 10150a0753..f90233874e 100644 --- a/cpukit/libdl/rtl-alloc-heap.c +++ b/cpukit/libdl/rtl-alloc-heap.c @@ -9,7 +9,7 @@ */ /* - * COPYRIGHT (c) 2012 Chris Johns <chrisj@rtems.org> + * COPYRIGHT (c) 2012,2023 Chris Johns <chrisj@rtems.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -54,6 +54,9 @@ rtems_rtl_alloc_heap (rtems_rtl_alloc_cmd cmd, free (*address); *address = NULL; break; + case RTEMS_RTL_ALLOC_RESIZE: + *address = realloc (*address, size); + break; case RTEMS_RTL_ALLOC_LOCK: _RTEMS_Lock_allocator(); break; |