Enable __cxa_atexit && __cxa_finalize for linker
This allows adding destructors to classes used
for global variables.
(cherry picked from commit 14241402de0faa4b244b1bd6b1f0799ce169b880)
Change-Id: I1d8776130d1e01a8c53d23a2949f5010f4c96b16
diff --git a/linker/linked_list.h b/linker/linked_list.h
index 8096e62..e51eb9c 100644
--- a/linker/linked_list.h
+++ b/linker/linked_list.h
@@ -32,6 +32,9 @@
class LinkedList {
public:
LinkedList() : head_(nullptr), tail_(nullptr) {}
+ ~LinkedList() {
+ clear();
+ }
void push_front(T* const element) {
LinkedListEntry<T>* new_entry = Allocator::alloc();