blob: 719a25e06a1d7490251d7f983800f12f9cb82739 [file] [log] [blame]
Linkloader improvement: mclinker.
commit c58eed892e965064c66841b99a7492b155bee456
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Mar 15 09:07:33 2012 +0800
Add Android makefiles for MCLinker.
commit 2fafd87a75fb85f77453cbec31403a2df47a284f
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Mar 14 14:43:00 2012 +0800
Remove things under mclinker/test directory.
It is not required for MCLinker build.
commit 64b43e630548f6ff5e29f67fd50fdfa1627cdd03
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Mar 14 18:54:32 2012 +0800
Increase version number to 2.10.1-18peaks.
commit 2670f6eb7355fac11eeb1e9b4b7cbad2cdcc8b96
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Mar 14 18:53:27 2012 +0800
Update golden model of ARM Quake
commit bbe26afd1ea952e3d35ef4b7cb62ba4a88fa31c7
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Mar 14 18:43:58 2012 +0800
Fixes issue 21 comment 1.
crtbegin.o should precede all input files and crtend.o should be the
last. Golden model files for ARM are also updated to reflect such
changes.
commit 99a16a23c03e34e50537efe5337fc2b00444edce
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Mar 14 17:44:15 2012 +0800
Update golden model files for X86.
commit 9bd9575c2676f7b409e18c021c73264a9cfbb705
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Mar 14 15:46:50 2012 +0800
Add error message when scan relcoation R_ARM_BASE_PREL
Currently we handle R_ARM_BASE_PREL only if its target
symbol is _GLOBAL_OFFSET_TABEL_
R_ARM_BASE_PREL only against symbol defined by linker,
for example, section or segment symbols. Now we support
only got section symbol _GLOBAL_OFFSET_TABLE_
commit fb2c70a1b22c594b256c1726cc7eff03a98065a5
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Mar 14 15:39:43 2012 +0800
Fix a bug - region should not released before creating symbol.
Because we use llvm::StringRef to pass symbol name, and llvm::StringRef
has no copy of the string. So, we must remain the region until we
finish creating symbol.
commit ac12e4f59fe222245f1cb924b760b932644c096e
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Mar 14 14:26:46 2012 +0800
Refine code. let entry size use type size_t, not uint64_t.
commit d904b5a237f7d49450d6569bfbce2d20d63866f3
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Mar 14 14:19:39 2012 +0800
Refine a bit - to supress the warning messages.
commit 6cd13d38e0fdb37e35fc6e2211d1d566b7609d28
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Mar 14 13:54:06 2012 +0800
Refine code.
The size of got entry and fragment is hard to out of the range of size_t.
So, I use size_t instead of uint64_t.
commit 7de970aba179e30db7f69486eeac7b3e9f052fb7
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Mar 14 13:46:19 2012 +0800
Suppress the build warnings in GNUArchiveReader.
Patch by Ping-Jung Lu <pingjunglu at gmail.com>.
commit f53bf100944d0b15d1d8509e8450ea9cb5863e0c
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Mar 14 11:12:02 2012 +0800
Rename the function.
commit 363f704321b4a533bd5cc624790749a28509a169
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Mar 13 21:54:25 2012 +0800
Refactor pread() out of request() in MemoryArea.
commit 2aac5daab09f381d49a5106b0ec07d6e96680b15
Author: Luba Tang <lubatang@gmail.com>
Date: Tue Mar 13 21:34:56 2012 +0800
Use MemoryArea::release(MemoryRegion*) to reduce the memory footprint.
commit 7f8198e609778300fcd853f388f40b3c9caac6c1
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:49:29 2012 +0800
For enhance performance, remove MemoryRegion::sync()
commit cccd59a73e6995654815b1c827c80d9867519536
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:45:14 2012 +0800
Add new functio - RegionFactory::destruct(MemoryRegion*)
commit a9f2046bb3a98105c3ac466823764dd8b0b836bd
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:44:05 2012 +0800
Add drift and increase/decrease MemoryArea::Space::region_num
commit 203df1dce6f0499288e6da60043243f6c63643da
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:38:45 2012 +0800
Avoid from allocating big memory space at very first time.
commit 7719d5b9a39baa77c4edfd98d3107013cbac5333
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:37:57 2012 +0800
remove obsolete ScopedWriter.
commit 46252dc19cccb09dbcff0b28c42075bdbf602d77
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:36:25 2012 +0800
add a new field of MemoryArea::Space - region_num.
Let MemoryArea::Space be countable.
commit 7deb4cc8fbd34b96761c5654bd2d59223060799d
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:32:57 2012 +0800
Refine code. Change the type of parameter of PLT::reserveEntry from int to size_t.
commit a32b0633a1cb899563aceced1901801587d56b52
Author: luba <lubatang@gmail.com>
Date: Tue Mar 13 20:31:01 2012 +0800
Remove obsolete ScopedWriter.
commit 3f1657871789c2e10597fb814a8976a287e8b1a9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Mar 13 20:20:54 2012 +0800
Set real relocation type to R_ARM_TARGET1 and R_ARM_TARGET2
commit 7ee57163fb4274e29fc2004524847d0f7d1cc2c4
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Mar 13 19:59:11 2012 +0800
Update golden model files for ARM.
commit 5460ca01dbf89e72f47ef936f923e28a32b925cb
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Mar 13 14:06:44 2012 +0800
Add ARM relcoation function for R_ARM_TARGET1
Refer to GNU gold, treat R_ARM_TARGET1 as R_ARM_ABS32
commit 222cbd1efa892d48aa47d6de195778b51293dc2a
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Mar 13 12:00:35 2012 +0800
Set section .ARM.exidx and .ARM.extab to 'Exception.'
Currently we emit these two sections directly from inputs.
commit 84bec2b1a2d6a6d3612b1b691d1130395d1ebbfa
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Mar 12 21:47:19 2012 +0800
Add ARM relocation support
R_ARM_BASE_PREL, R_ARM_TARGET2 and R_ARM_GOT_PREL
Refer to GNU gold, we treat R_ARM_TARGET2 as R_ARM_GOT_PREL here
commit 7209c752ab4e6e0e26d51261260fbee51fb8752e
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Mar 12 21:23:02 2012 +0800
Suppress more warning messages.
commit 726dd63cd894c08336f8bd96dd9fe5d80d9d77ee
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Mar 12 20:33:27 2012 +0800
Suppress the warning message about enumeral and non-enumeral type in conditional expression
commit 0814259a29b34222959eb8e49fb2e2ff5aa3c7e6
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Mar 12 20:16:54 2012 +0800
Remove some unused code and variables.
commit e20dc4fd1122ebdd5e0b33f7b7c04b59067762f3
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Mar 12 19:12:12 2012 +0800
Suppress the warning messages about order of initialization.
No functionality was expected to change.
Initialze the member variables in the order they are declared.
commit 3ef7531e9e700666a9fdb5ff9a5ac7abab422a92
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Mar 12 19:07:33 2012 +0800
Rename m_ELFSegmentFactory as m_ELFSegmentTable in GNULDBackend.
commit afba4bc78d33a361e32f926e7a272898800dab01
Author: Luba Tang <lubatang@gmail.com>
Date: Mon Mar 12 18:39:13 2012 +0800
Fix a bug - SymbolCategory::arrange upward does not change the category.begin/end correctly.
commit 843d7c0e8c4831362439d349dd71c9412e44067f
Author: Luba Tang <lubatang@gmail.com>
Date: Mon Mar 12 18:33:46 2012 +0800
Add access functions of SymbolCategory.
commit 05bdee9db90fbffa6088be80e99b9d0acf553907
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Mar 12 16:48:16 2012 +0800
add ELFSegmentFactory class.
commit dad3cbf8460739d2a709224c7f101e66336837b0
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Mon Mar 12 15:56:10 2012 +0800
eliminate clang++ warnings
commit 9bf8e7d52e08420b0ef4d35f7cf90207731cb628
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Mar 12 15:21:56 2012 +0800
Migrate to LLVM upstream r152063.
commit 32f23312756038f853d959613721f6df83e0a16f
Author: luba <lubatang@gmail.com>
Date: Mon Mar 12 15:08:39 2012 +0800
remove sed -i option for all platforms.
commit 74bbca62e25f04adfdbb3f7d6ad29c4b00635c3b
Author: Luba Tang <lubatang@Scarecrow.local>
Date: Mon Mar 12 14:59:25 2012 +0800
Conforming to Mac iOS 10.7.
Using sed -i "" -e instead of sed -i
commit 30c4c4a9abf655fb30817846c0fa71ad3cf49aa3
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Mar 12 14:57:03 2012 +0800
Update golden model files for ARM.
commit 8be0c24c9cbeea14fdefb06bee5f3172a2b2466f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Mar 12 14:12:32 2012 +0800
Fix a bug - If not building a PIC object, no relocation type is invalid
commit bab512b3b7c1f15a578666bf0cf3c8e807588381
Author: luba <lubatang@gmail.com>
Date: Mon Mar 12 09:47:41 2012 +0800
Revert "Fix a bug - No matter the old symbol exists or not, StrSymPool should"
This reverts commit ae5f00574654c98426f95bc0e062ce0e5727ad25.
The bug is in SymbolCategory, not StrSymPool.
commit 517d91be79c2e5bf8e3e9d0c34adbd6d09c70a75
Author: luba <lubatang@gmail.com>
Date: Mon Mar 12 09:47:14 2012 +0800
Revert "Conforming to FreeBSD's sed."
This reverts commit d5decba261d3ad72d0bb978a805e3269a79bd014.
commit ae5f00574654c98426f95bc0e062ce0e5727ad25
Author: Luba Tang <lubatang@gmail.com>
Date: Sun Mar 11 16:16:08 2012 +0800
Fix a bug - No matter the old symbol exists or not, StrSymPool should
set pOldInfo if it isn't NULL.
commit d5decba261d3ad72d0bb978a805e3269a79bd014
Author: Luba Tang <lubatang@gmail.com>
Date: Sun Mar 11 16:00:05 2012 +0800
Conforming to FreeBSD's sed.
commit 092c60351451c2e34ab22970ed78a4adefa05ec8
Author: Luba Tang <lubatang@gmail.com>
Date: Sun Mar 11 15:58:16 2012 +0800
Add Mips backend.
commit e09e8f332dab61b7f74ea684fb44928b16344415
Author: Luba Tang <lubatang@gmail.com>
Date: Sun Mar 11 02:52:46 2012 +0800
Refine format.
commit 1f5e424dc99c7d103044e1623fe47b819b0137bb
Author: Luba Tang <lubatang@gmail.com>
Date: Sat Mar 10 03:50:00 2012 +0800
Fix a bug - when a entry does not exist in a hash table, the parameter
bool & pExist should set false.
commit b6a144426f7c819ef60b05f1717a5e7bfd4bf6fa
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Mar 9 11:48:48 2012 +0800
Fix a bug - When applying ABS32 relocation in X86 and ARM, check if
symbol is not local (external) instead of checking if it's global
commit 7362d1e643756893d4b8e9eec0f0f22f89082a2d
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Fri Mar 9 09:28:56 2012 +0800
Fix arithmetic error in MIPS helper_CalcAHL.
Fix helper_CalcAHL section offset added to avoid arithmetic error by
the comment http://code.google.com/p/mclinker/issues/detail?id=20#c24
commit feaf13d60030aaf1ec4a719b53c5a7670f8fa436
Author: luba <lubatang@gmail.com>
Date: Thu Mar 8 17:36:49 2012 +0800
clean up code.
commit 29ba42e4513ee8e9ff9317cdca359d96c449f12c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Mar 8 17:28:37 2012 +0800
Fix a bug - In OutputRelocSection, not to use iterator as a boolean
commit c3a62be7ffce3f652bab64785b5462c05276d135
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Mar 8 11:09:24 2012 +0800
Fix a bug - Modify X86RelocationFactory
The dynamic relocations which relocating GOT entry,
their type may be R_386_RELATIVE or R_386_GLOB_DAT
commit ea5c2032f569376f8d927cfe10ad0eb9119831f7
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Thu Mar 8 00:44:41 2012 +0800
Fix AHL HI-part value in MIPS AHL calculation.
commit efd979162595780f5f1d15bd071ae8b715c5c68a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Mar 7 22:10:21 2012 +0800
Fix a bug where applying wrong value to PLT entries.
commit 9d38ed3a0b946a3d100edf4206c71db5528fc92e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Mar 7 20:33:56 2012 +0800
Fix a bug - The dynamic relocations which relocating GOT entry,
their type may be R_ARM_RELATIVE or R_ARM_GLOB_DAT
commit af4263eff50dc4fc0185f9bd3cbea7ededc72425
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Mar 7 07:42:17 2012 +0400
Cleanup the code. Remove obsoleted FIXME notes.
commit a15ce7547bf10d2d36efbac0d7b1f732531b0532
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Mar 5 14:18:33 2012 +0400
Remove redundant code. MIPS local GOT entries cannot be dynamic. MIPS
global GOT entries are always dynamic.
commit 2d66da2594d9c0d7a9039199855a89f6df7b2594
Merge: 7945be9 bd8e77f
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sun Mar 4 17:52:00 2012 +0400
Merge branch 'master' of https://code.google.com/p/mclinker
commit 7945be9fa81db1bc83e36cfd9a48a2a743b4ef4b
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sun Mar 4 17:26:15 2012 +0400
Fix a bug in the R_MIPS_GPREL32 relocation handling.
commit bd8e77f50d2366289d72531453bb4b3d82eff7ac
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Mar 2 13:50:07 2012 +0800
Refine code. Pass more specific GNULDBackend to ELFFileFormat instead.
commit 21d1e845be3d83f22c9b0795bcbe76a7e7b9b08b
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Mar 2 11:17:17 2012 +0800
Return the number of bytes being written in leb128::encode().
commit 46a42e8f46a4153294ddc19afa45e212599e5193
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Mar 1 15:39:11 2012 +0400
Emit MIPS .rel.dyn entries for local symbols.
commit 692a9dbea99d575a61d9f8dc96813de91702eed5
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Mar 1 14:52:47 2012 +0400
Use target() and addend() uniformly in all MIPS relocation handles.
commit 01cb37e11941d5cad49843872d2fdae51cf11075
Author: Luba Tang <lubatang@gmail.com>
Date: Fri Mar 2 01:34:37 2012 +0800
Fix a typo in README
commit 6a5e7296d267366f0a738aab2d3bd39919ef68fd
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Mar 1 21:14:36 2012 +0800
Set the align field in output LDSection.
For output LDSection,
1. the alignment is initialized in the initialization function of
"FilfFormat" or Target Section
2. the alignment is also updated when merging sections if needed
Then we can use its alignment constraint in Layout::layout() directly.
commit d2f094c84b419254f163c63d53346245d47ccc6a
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Mar 1 21:26:10 2012 +0800
Fix a bug - use the value from -mtriple when possible.
commit 9413eacd135be46d5d43cb7a42fff3b1bab33ef6
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Mar 1 17:35:51 2012 +0800
Update optimized/Makefile.am
commit f75e059b3bf05a2bc5f3832a83e54f261d06d17e
Author: luba <lubatang@gmail.com>
Date: Thu Mar 1 16:17:27 2012 +0800
Refine README - add the steps to download and compile clang.
commit 6c0fcd2e7aadddeaa856994897a9e5a5ffc36345
Author: luba <lubatang@gmail.com>
Date: Thu Mar 1 11:59:13 2012 +0800
Increase version number. Sorry for the long and large release.
In this version, both ARM and X86 Android cases (with CRT) are examinated.
commit 2ffae8a472b1f6f526a5cb8e8245e51a5d618558
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 29 23:57:41 2012 +0400
Add missed files for MIPS target testing.
commit 79f618678fcc25884359cef66ce5e6b41df60636
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Mar 1 10:37:46 2012 +0800
Fix a bug - update addend of the relocation against a section symbol
Add updateAddend into ARM/X86/MipsLDBackend.
For the relocation which againsts a section symbol, its addend
is supposed to be the offset in the section. This offset should
be updated after section merged.
commit ee10db85d63962f08152a5c89a94a54a74a302ed
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Mar 1 10:37:17 2012 +0800
Update golden model files for ARM and X86.
commit 9a3e5b180107e7a8ca3eb2c21da6d766dd50b851
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 29 06:55:41 2012 +0400
Add Plasma test case for MIPS target platform.
commit db2dc667e6e07e3f41be496f1653e249f75dba47
Author: luba <lubatang@gmail.com>
Date: Wed Feb 29 18:17:49 2012 +0800
Refine format.
commit 5b8ca2e10aeb5f1bf609ebdedc372db09a97a3ee
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Feb 29 13:50:08 2012 +0800
Handle the alignment of common symbols in X86GNULDBackend
commit 47a6a79752d9cf061757f5e05dc2da3de97f294f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Feb 29 11:36:23 2012 +0800
Fix the value applied to PLT1 entries.
According to the order of .got and .plt,
we should use different ways to calculate the values of PLT1 entries.
commit b49129b899bcf88c8d76f35aaeb3805a44b6c7eb
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sun Feb 26 17:22:09 2012 +0400
Fix R_MIPS_HI16 / R_MIPS_LO16 relocation calculation bug.
commit 2551281f30c53db037b628b128bc887ea053bc36
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Feb 24 19:49:41 2012 +0800
Update golden model files for ARM.
commit ba2dff7c335ac23eaaf0f70fe999f14275c0de94
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 19:13:00 2012 +0800
Fix a bug - use virtual fillment fragment to represent zero sections.
commit 7f0459ab6c403775fafb11f95c17e6b42eb08147
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 19:11:52 2012 +0800
Refactoring - remove pIsWrite parameter in MemoryArea::request.
commit d22cfbc0a372a748990aee94b432d8ca3a6a5e72
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 19:09:33 2012 +0800
Refine code.
commit 309a3094cf4098cd0ce59f431f8a5752c8a9ddf0
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 19:08:39 2012 +0800
Refine code.
commit dfea6c724986980f0b47878eb73c6deee0654c1e
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 19:07:19 2012 +0800
Allow MemoryRegion is a virtual, zero memory address space.
commit e90c7108897d441912a0ba648511c199f3da51ec
Author: luba <lubatang@gmail.com>
Date: Fri Feb 24 12:10:45 2012 +0800
Read exception and version sections.
commit b36d04682eee8e4f5891d8141b2b8963efe52fc4
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Feb 23 16:09:22 2012 +0400
Configure .rel.dyn entries.
commit 67f1ffd187742c6ca7827a1bb62866d0570abc3d
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Feb 20 16:05:10 2012 +0400
Process R_MIPS_GOT16 for local symbols.
commit 775875f83689bdf45f18cb0836e1fa25fb7cf315
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Feb 20 15:56:13 2012 +0400
Allow to call helper_CalcAHL() for R_MIPS_GOT16 relocation.
commit 97da85f1fcb643f97e14c1bc0ddfe00bf4b5c227
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Feb 16 10:41:12 2012 +0400
Emit local GOT entries before global ones.
commit cfc393a694d9107d1c3a9fe18a856521115ac13f
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 21:07:12 2012 +0800
Fix a bug. Fix the typo for DT_INIT_ARRAYSZ and DT_FINI_ARRAYSZ in ELFDynamic.
commit 95d864a8e4d928dde6d2490827694558c6249358
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 21:05:14 2012 +0800
Fix a bug. Correct the section kind and output section order of .eh_frame
commit d0d46c5618a397154ae87bfc4f6b572e194b0133
Author: luba <lubatang@gmail.com>
Date: Thu Feb 23 18:18:12 2012 +0800
Fix a bug - ELFObjectReader should read Exception and Version sections.
commit 6f0cfd0ee056b8ffdb39f98630e072a44530de38
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 17:44:23 2012 +0800
Initiate MCAlignFragment emmision support in ELFWriter::emitSectionData()
commit 4bcb041764e509af45b0fab47c5e0d0fc931f1f7
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 16:34:54 2012 +0800
Handle alignment issue as finding FragmentRef and deciding section offset.
commit 310c12126e9ac5e3ff9bb642729e1fe041ec4cd2
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 16:12:23 2012 +0800
Use Layout::appendFragment() for mergeable sections.
Currently we changed to use new API as
1. reading Regular sections and BSS sections from input objects.
2. allocating common symbols in BSS sections
commit 3739e4217e45fbb6781c184e1b90d240c7b8133f
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 16:06:01 2012 +0800
Add API Layout::appendFragment().
To handle alignment in section merging correctly, we need to preserve input
alignment constraint. For mergeable sections (e.g., .text, .data, and .bss, ...)
from input objects, we should use this new API to append the fragment to the
associated MCSectionData.
As for the backend part, there is no need to change the used API.
commit ade62d0450729561944699f599b22e64f6756626
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 16:03:17 2012 +0800
Set up the alignment constraint of input section in ELFReader.
commit d797fa0a4a09cc5ae4689e2c592ccc5758235b6e
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 16:02:45 2012 +0800
Add a field in LDSection for alignment constraint
commit cd346eff71145785b1fb96363756452b6edf79c5
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Feb 23 17:27:18 2012 +0800
Remove the const-ness from ELFReaderIF::readTargetSection.
Target-specific section is usually associated with a specialized
object which is managed by the target backend. And during the
read, it processes the bits from the input and may changes the
state of the associated object in the target backend.
commit d423039e0a1bdf05425a1d236ed96d24414cbbd8
Author: luba <lubatang@gmail.com>
Date: Thu Feb 23 16:49:05 2012 +0800
Fix a bug - exception section should be able to be relocated.
commit e565d30787176f67a1cfaeb35a85000c982a65bc
Author: luba <lubatang@gmail.com>
Date: Thu Feb 23 13:44:43 2012 +0800
Enhance warning messages.
commit 8b9fbaf526e2edcbd59da1a483181979ac6ae5da
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 10:13:37 2012 +0800
Code refinement.
commit dd3c5ab939a607c5fc538a6875f3a7f2d52a9e1b
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 09:51:31 2012 +0800
Fix a bug. Correct the way to calculate the file size of a ELF segment.
commit 71d1bf7ae0dad888885bd46113e3c61f4d186436
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 09:42:52 2012 +0800
Fix a bug. Correct the offset of a section which is right after BSS section.
commit 776eba0e3317ff4b29b91d04c19dd21b2a89db4d
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 09:39:12 2012 +0800
Remove sect_iterator in mcld::Layout
commit 65371459a7251f00361cb31aa655d43511432b5b
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 23 09:35:34 2012 +0800
Refine code and comment.
It should be more clear to set output section indices after sorting section order.
commit 90ceb06ca53afda34504e048f10b9be50ff0ace3
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Feb 22 18:42:36 2012 +0800
Thumb relocation note.
commit 4681126a39cdfe435b6f2767a8fad98fbee57d35
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 22 15:06:49 2012 +0800
Remove handling 64bit backend in MipsGNULDBackend::emitDynNamePools
commit 4ca129cb8ac7fdbfe71a72d3cfe2e19fc524273f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 22 14:30:59 2012 +0800
Add a HashMap into GNULDBackend to map symbols to their ouput symtab index
1. Add a HashMap m_pSymIndexMap, maintain the map when emitDynNamePools
and emitRegNamePools
2. Add an API GNULDBackend::getSymbolIdx to get symbol's index. This
API is used when emitRelocation. This API takes the place of
original LDContext::getSymbolIdx.
Now only the input symbols will push into LDContex's symTab, the
output symbols and the index maintained in m_pSymIndexMap of GNULDBackend.
When emitRelocation, we get the symbol's index in ouput symbol table
by asking the HashTable, this can reduce time on searching from the
vector and avoid string comparison.
commit fca4108f643edeb74d163d9b7ddb2871b3a3dc1f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 22 14:21:17 2012 +0800
Add API - LDContext::addSymbol
Add input symbols into SymTab in LDContext by this API instead of
pushing into the SymTab directly.
commit 1ff48e8f60c04334c284bd76dff99ce02bb1de20
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Feb 22 12:16:38 2012 +0800
Separate the implementation of LEB128 from header.
No functionality or API changed.
Fully specialized template functions are just like the normal
functions. It doesn't depend on the template parameters any more.
Therefore, you should declare them as inline functions in header
or define them in a .cpp in order to not violating the ODR. And
we choose the later.
commit 12732aea6e1844c07bc066681bfde8792bf4f56f
Author: luba <lubatang@gmail.com>
Date: Wed Feb 22 12:02:05 2012 +0800
Refine warning information.
commit ab8b32751554b817d3920375557c06106b505fc2
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Feb 22 09:30:47 2012 +0800
Allow signed char stream to be passed to LEB128 APIs.
commit b03e65f660416f0d34ec3770b34fcf057a294e27
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 23:01:36 2012 +0800
Add special section support in ELFFileFormat
@ref "Additional Special Sections," ch. 10.3.1.2, ISO/IEC 23360 Part 1:2010(E)
commit 6f429e27a868513bab6164d85f3e2af181c1857d
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 23:00:26 2012 +0800
Fix a bug - MCLinker should not set the index of output LDSection.
Instead, Layout should set up the index of output LDSection.
commit 18cb084376bbe4589e0457265913821aa140400f
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 22:59:39 2012 +0800
Handle Exception and Version section kind.
commit 455bc970e42ff12b3ed9dc0aed05d8489bbd0d1f
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 22:58:51 2012 +0800
Fix a bug - initialize LDSection::m_Index.
commit 0c51de0dedac8f0f37f6e406255284a375b3e2a8
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 22:57:34 2012 +0800
Add new LDFileFormat::Kinds - Exception and Version.
Exception is used to identify a section for exception handling.
Version is used to identify a section for symbolic versioning.
commit 8f0ae100a435e4b53943dbe2636a43e9e7fd80b6
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 22:55:54 2012 +0800
Complement lost ELF definitions in LLVM/include/llvm/Support/ELF.h
commit c2754ddbdea85ad0460dd6e67e5d8d6ff549a1de
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Feb 21 19:58:24 2012 +0800
Fix typo.
commit e1454f9d24b40e0784ef603bf844d87bad465054
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Feb 21 19:54:48 2012 +0800
Rearrange files for regression test.
commit e4f8b8bf06c56d012146c363bed24f7125c3d032
Author: luba <lubatang@gmail.com>
Date: Tue Feb 21 17:01:56 2012 +0800
Add ISO/IEC 23360, LSB support.
commit 4b58952253ff5b980c61837fe4f97217ae5b09ca
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Feb 21 15:06:10 2012 +0800
Change the decoding function APIs of LEB128.
Original: IntType decode(ByteType *pBuf, size_t *pSize);
Revised: IntType decode(const ByteType *pBuf, size_t &pSize);
IntType decode(const ByteType *&pBuf);
Also fix bugs in encode<uint32_t> (wrong mask.)
commit f00151375dd50bcbe34ab6971933e8a932e76914
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Feb 21 13:49:31 2012 +0800
Load the input file content into memory after open.
Almost every byte in the input file (e.g., input object file) will
be examined during processing. Enforcing kernel to load the entire
file into memory right after open could generally reduce the
number of page fault generated.
commit 7835521c2893df4650c46263f8ad8aa047d0a396
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Feb 21 12:11:19 2012 +0800
Fix HashTable - Identify ambiguous methods by adding an anonymous parameter
commit a1b98456c9978f4b47842ac91912a9131db4fa0c
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Feb 21 11:56:03 2012 +0800
Use more correct type in template class SizeTraits.
commit 706e8c41dfeab68417fb7f90e7815ea7e053e935
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Feb 21 11:44:51 2012 +0800
Add utility functions to support LEB128 encoding.
commit 94b6e95182389993c807cb473b9ca2de7556cb7d
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 18:14:04 2012 +0800
Add unit test for GCFactoryListTraits.
commit 2a19a2a89b60d18cc63e31cfe98ed41079105b92
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 17:31:37 2012 +0800
Format tabs with some typos fixed in Makefiles.
No functionality changed.
commit 1b7be3e5098d852dc726f6d41a887c13ed9b9593
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 10:18:54 2012 +0800
Use LinearAllocator for input Relocation.
commit 8eb7dc5a8f50b6826de4cd3172bc4973ccbfd672
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 10:13:37 2012 +0800
Add GCFactoryListTraits.
GCFactoryListTraits provides trait class for llvm::iplist when
the nodes in the list is produced by GCFactory.
commit ec8c9322c12cb68aeb5c84bd7b77214c1544e7e4
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 13:47:13 2012 +0800
TargetLDBacked should have longer lifetime.
TargetLDBacked contains target RelocationFactory which holds the
allocation of the Relocation entries a target uses during linking
(i.e., MCLinker::m_RelocationList.) If the TargetLDBacked object
was destroy first, it will cause the relocation list in a valid
object however its allocation has been corrupted.
commit cba8168c37579a45322bd1b99c3e574d77763118
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 17 10:06:39 2012 +0800
Let RelocationFactory inherit GCFactory again.
This reverts commit 6ffb8df05e1c0859fd2e74217b645ec3466e457f
"Change Relocation member variable m_pTargetData type from DWord* to DWord"
and commit f2e77a332a448cb1ac0ac2f30c599c7f4987814b.
"Let RelocationFactory not to inherit to GCFactory"
commit 84634224e89ab32ec1c482de943359ce0f31cd5e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Feb 16 13:56:35 2012 +0800
Use llvm::ELF to specify the namespace of ELF
for building MCLinker on FreeBSD machine.
commit f5543c18085dcafc8740473bf2bce9bc107f3ed0
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 17:26:41 2012 +0400
Do not reserve GOT entry twice.
commit 7d5e0e96d6687522fd57c06584d119c3d2948f62
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 17:09:52 2012 +0400
Save calculated AHL value between R_MIPS_HI16/R_MIPS_LO16 relocations.
commit 4602029c2f9b0992f7ed5391ab7f43f289f13fca
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 17:04:48 2012 +0400
Replace duplicated code in the MipsGNULDBackend::emitDynNamePools() routine
by getOutputFormat() call.
commit 1263f542c4afa34986c5c44e88800856309719a7
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 16:59:51 2012 +0400
Emit dynamic symbols referenced by GOT at the end of .dynsym section.
commit 312d21fe5664cae5d7abd2a677683d547f0ab791
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 16:54:01 2012 +0400
Save local/global symbols referenced by GOT in the m_LocalGOTSyms/m_GlobalGOTSyms arrays.
commit ebc1e5c938c5e3f6497c70f9f165063c3f2d0981
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 15 16:45:41 2012 +0400
Make hash_bucket_count() and isDynamicSymbol() the GNULDBackend class memebers
to reuse in the GNULDBackend successors.
commit 7933aef3fc78c35a1cbf9dd98d55605bf874a8d7
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Feb 15 18:02:19 2012 +0800
Fix bugs in group section handling.
1. set up the link section of group sections as symtab section
2. correct the code to check if discarding a relocation section
commit 05deb106a3b706c74e3f11cc64e815f7f40beb06
Author: luba <lubatang@gmail.com>
Date: Wed Feb 15 14:06:46 2012 +0800
Refine optimized compilation options.
commit 2b75acf4db917ed853cee8457d2c8618c6719daa
Author: luba <lubatang@gmail.com>
Date: Wed Feb 15 14:05:59 2012 +0800
Enhance performance. Eliminate the number of MemoryArea::request.
commit 227e94232b776ce9b5e5d550900fce46b140a6b3
Author: luba <lubatang@gmail.com>
Date: Wed Feb 15 14:03:59 2012 +0800
Refine group section code.
commit e0e0dee53da2c3bbd4cf1fe80e10012b565ddffa
Author: luba <lubatang@gmail.com>
Date: Mon Feb 13 14:08:26 2012 +0800
Refined optimized compilation options.
commit 127607018a29c29cd4ae7649015852d53382f777
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Feb 15 14:03:14 2012 +0800
We can use diff only.(Return value.)
commit 5a2927a9a63d088ebde7b13a01d0f83a319d06a2
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Feb 15 13:41:54 2012 +0800
Copy bitcode to individual folder.
Copy to same file will cause error when multithread.
E.g. When A thread is running plasma_arm and reading the bc, another
thread is running plasma_x86 and copying the bc, plasma_arm will fail.
commit f702adaffc4649915e7c3bc3684d1ac1780ebc33
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Feb 15 13:37:53 2012 +0800
Fix typo. Remove unused file.
commit e066a3c508d2ef6ab408a7845f403d97d4754cda
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Feb 14 16:45:55 2012 +0800
Fix a bug - When scanRelocation, Weak and Common symbol should do
scanGlobalReloc. While scanGlobalReloc handles all the external
symbols but not only for symbols with Global binding.
commit ad6732f718a0b21f53d338e24f0fcacf467f9898
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Feb 13 21:06:13 2012 +0800
Add group section support.
The shared objects of Quake Android w/ ELF group section are verified on both
x86 and arm target.
commit 8a4d59bc9c591d8eaf8a6b6b96a47c2e73a79dcf
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Feb 13 20:50:06 2012 +0800
Remove Relocation member variable m_Parent
commit 6ffb8df05e1c0859fd2e74217b645ec3466e457f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Feb 13 20:20:31 2012 +0800
Change Relocation member variable m_pTargetData type from DWord* to DWord
To reduce memory footprint, let Relocation entry holds the TargetData
itself instead of using GCFactory to allocate a memory space for TargetData.
commit f2e77a332a448cb1ac0ac2f30c599c7f4987814b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Feb 13 20:14:03 2012 +0800
Let RelocationFactory not to inherit to GCFactory
commit 758c2c1c49fcf0678c0720ecd58119d2b236106e
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Feb 13 19:08:31 2012 +0800
Separate Link and Info from LinkInfo in LDSection
commit 2e34545e28918e18383061f2d5352b57d526f3b0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 13 14:30:00 2012 +0800
Add regression tests for the Android examples on X86.
Running the regression tests for X86 by binary file comparison.
Remove them when MCLinker has more test cases for X86.
commit a80b5d3532770202298b2eadec4d417a5586310d
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Feb 11 07:57:40 2012 +0400
Move the const GOT offset to the helper functions.
commit 13addedc0afe67f89ec677219098705ec4390bfa
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Fri Feb 10 03:31:13 2012 +0400
Adjust G value using _gp_disp offset.
commit aa41a8c624b9f5ce936555b15940e37d524bef19
Author: luba <lubatang@gmail.com>
Date: Fri Feb 10 17:47:05 2012 +0800
Add support for target-dependent section.
commit 76e0a0c7cbd6edc5c2e399e4320b3372f3a1debf
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 10 10:47:39 2012 +0800
No need to specify -dB for linking native files.
commit 74deea14a47458276f5e8d6ca465170f480e7575
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 10 09:08:34 2012 +0800
Drop the dependency of llvm::Module in SectLinker.
Change the API of the constructor of SectLinkerOption. We now read
the library dependency from command line. Also modify the test such
that `make check' still works after this commit.
MCLinker requires both native input and its associated bitcode (
via -dB option) for linking. MCLinker treats the input bitcode as
linker script.
More specifically, given a bitcode module, MCLinker only need the
dependent library information within the module which can be
assigned via command line option "-l." Moreover, MCLinker spends
90%+ time on decoding the bitcode when performs linking.
This and subsequent commits relax this requirement.
commit 5df66059bdfc6124454269148a755e953380b833
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 10 10:54:01 2012 +0800
Fix logic bug.
commit 1a835f684ea2e8cd3a6093452c2e4df83098c6c8
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 10 03:29:03 2012 +0800
Fix build on Mac.
commit ec6e41d254b2075e4c77e9ddae0887ad18a2ee36
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Feb 9 20:24:10 2012 +0800
Use the proper variable.
commit 7973e64e61ee5726585b47317b965f2e705d2cdb
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 17:43:02 2012 +0800
Fix a bug - user, OS, and processor specific section types should be LDFileFormat::Target sections.
commit 6b6cc27f922bb29d97067050af67a81949eb832e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Feb 9 13:55:15 2012 +0800
Refactoring - Add getOutputFormat to ARM and X86LDBackend
commit 6d22b22a75a27d042598c0fd20e19744e0c0ce86
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Feb 9 13:38:24 2012 +0800
Refine the code.
Reduce the calls to map insertion in MemoryAreaFactory when an
entry already exists in the map.
commit e9c111d26aa52658c1631aaff527657310b0c9ea
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Feb 9 11:27:23 2012 +0800
Refine error message in ARMRelocationFactory
commit 3700ecf0983d2b33d7ea215df3c7e52ae7b0e155
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Feb 9 10:01:08 2012 +0800
Add a regression test for Quake2 on ARM.
Currently running the regression test for Quake2 by binary file comparison.
Remove it when MCLinker has more test cases to ensure that Quake2 will work.
commit d745e9af87248e14734e8e7755c9002d7dd045af
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Feb 8 11:41:59 2012 -0800
Allow R_386_PC32 in scanGlobalReloc if not preemptible
We allow R_386_PC32 only if it isn't preemptible. Otherwise we will
generate writable text section in output.
commit 8a165afd2271b9ccd362bfa6895265d38ba6a121
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 02:37:45 2012 +0800
Fix a bug - we should check visibility and change symbol's binding during writing.
commit a154003e4e366ec86f0d316fc0b7094983bcfb5f
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 02:31:23 2012 +0800
Refine code.
commit d3a172595bd3bea111ca8e41e7bbbee872a73035
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 02:30:43 2012 +0800
Fix a bug - We should not change the binding at reading.
commit 3011c9bb0b22ab09bba0d436daba715c3f2232de
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 02:29:33 2012 +0800
Fix a bug - When the symbol is old, and its category is changed, MCLinker should
arrange the symbol.
commit 9b6e3c2eda00db383efb2dc80230d3e23d77d50a
Author: luba <lubatang@gmail.com>
Date: Thu Feb 9 02:13:29 2012 +0800
Fix a bug - when a symbol is forcefully added into local category, all other categories' begin and end should be increased.
commit f0ef47e8d43bdcf3547288e7352121f9a5a90deb
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:08:12 2012 +0400
Check _gp_disp symbol existence before access it.
commit daca6babfab7111e5fd8b764ae4ced79d5f8205c
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Fix MIPS_GOTSYM value.
commit 9f220590f3de9cab18805e074c7f541c1face81d
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Fix bug in the NipsGOT iterator.
commit ee7ce7727d57b5cd5d884b8e487be66a88a027ad
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Fix a bug in the MipsGOT::reserveEntry() code.
commit 1414dcde776932e2def6422a316d1d22b7043afb
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Refine MipsGNULDBackend::scanGlobalReloc() code.
commit 4ff71f8439e66c25230c6828381be3945b5f1249
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Reserve GOT entry for non-local R_MIPS_GOT16 and R_MIPS_GOT16 relocations.
commit a06fdce36088665988f233b238e593f0b4db3783
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Reserve GOT entry for R_MIPS_GOT16 and R_MIPS_GOT16 relocations.
commit df254304c75b183565e3ac7adc7feb452241d46f
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Implement R_MIPS_GOT16 relocation for non-local symbols.
commit 52f1720b66f8fb743ad3a1101f382044f14aea99
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Implement R_MIPS_CALL16 relocation.
commit 7a2378c847fbccc17ec7818113de36232e4ead9f
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Fix a typo in the function return type name.
commit a1a47fd7486ee6f19c724c3757d139f8a142d415
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Implement R_MIPS_GPREL32 relocation.
commit 883ea5441cc05e1787fbae17a9e6d78f59d347f1
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Implement R_MIPS_HI16/R_MIPS_LO16 relocations for the _gp_disp.
commit 28a23a68d5a6c386d754e0bffab966fb27567bca
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Implement R_MIPS_HI16/R_MIPS_LO16 relocations (except _gp_disp).
commit 0e1c6bcb8469bae9ee88fe2d77b61096080fe9cf
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Fix typo in _gp_disp offset.
commit 62ab473c9f6365ffd9378b3d6d4c6c627a07fbb7
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Refine reservation type constant values.
commit c2ee7d13534683ce18d236172e88d3b0de9a6b4a
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Add helper function to setup .rel.dyn section entry.
commit 84fff7fbc2f453075a769375548c95e49bdc8dc6
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Remove handler for R_MIPS_REL32 relocation.
commit faad90e5fd5ef52bdee5e886ee1e85989e23e3af
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Add flags to mark requests for GOT and .rel.dyn sections entries reservations.
commit 602c0136c61e54723b5fe9ecc3e96eb66fdbe359
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Add methods to access .rel.dyn section representation.
commit 41488b02c69fcbdbb54d6c02afa39c83a8dff87f
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Define _gp_disp symbol.
commit 20b353a6fbaf111c50bdf6719c93204d9d285ad4
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Move calculation of the MIPS specific dynamic section entries to the
separate functions.
commit 5d0881a53692a009c4cbcf4e1484a08ebaea632b
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Reserve one entry in the GOT. Do not support gnu extension.
commit 9516ec8e00a1795de88ab5216be83f1a5148d1bd
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Write correct value to the MIPS_SYMTABNO entry.
commit 0d4f4594eba1b4f8d4581366ae8799260e9c75b2
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Pass non-const reference to the MipsRelocationFactory to relocation
processing functions.
commit d187eb62e4a279ade7e5c0f35ca250018d2aabfa
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Create reserved entries in the GOT head.
commit 471b08d6347342c7bbce57a896cc260e13ad12c2
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Synchronize code with ARM implementation.
commit 40ef97d600f82d95726a2b75855bfdfbef1a4e33
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Do not use std::auto_ptr to simplify the code.
commit 2385d784c99a87250beb69a003ae061aa9b6e578
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Rearrange MipsLDBackend class member functions.
commit 9dfd8cc0712d502b90557c1f3a9d30e7a73e2319
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Reserver and apply MIPS specific dynamic section entries.
commit 1a918712e467830dcdc433656964e32305ef5b8d
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Refine local variables names.
commit 1214910f8a141ddac21b9c7a596bc8f47849f56b
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Feb 8 14:00:00 2012 +0400
Pass reference to the MCLDInfo to the MIPS relocation processing
functions.
commit 679c2440ddecb8072276ea2c44a8262d462f6c3a
Author: luba <lubatang@gmail.com>
Date: Wed Feb 8 17:46:41 2012 +0800
If a symbol is absolute, it should be a global symbol.
commit 56cd3d6ceefb072cddbed6bf6543ac37a871fb23
Author: luba <lubatang@gmail.com>
Date: Wed Feb 8 17:46:12 2012 +0800
Enahnce error message.
commit 8ff5d1cdeed63bb3261c9b83f1535e4ff0577cfb
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Feb 8 17:35:08 2012 +0800
Add a regression test for Plasma on ARM.
Currently running the regression test for Plasma by binary file comparison.
Remove it when MCLinker has more test cases to ensure that Plasma will work.
commit 31c88c45e05e8a1f8ea1fccd5693e8d573127656
Author: luba <lubatang@gmail.com>
Date: Wed Feb 8 17:16:19 2012 +0800
Fix a bug - MCLinker should not forbid defining a section symbol.
commit 771a838be86aeed4534d61ca629cb5b08d33824b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Feb 8 17:01:30 2012 +0800
Reset errno to zero where the value of errno may has changed.
commit bd72555be4517d60efe2af63d4cae0760cff279e
Author: luba <lubatang@gmail.com>
Date: Wed Feb 8 15:43:17 2012 +0800
Fix a bug - we should finalize target symbol first.
commit 68ab790946559f18f70ea508a9833832284d6312
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Feb 7 09:21:00 2012 -0800
Handle R_386_PC32 in scanLocalReloc
We don't allow R_386_PC32 in scanGlobalReloc since it results in
writable text section in shared library and we don't support executable
yet.
commit 834a16a16ba848e40ff68c19de6e7fd85f6ef5aa
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Feb 7 11:07:25 2012 +0800
No functionality changes.
commit e6cadd10c455ad3e84c76a4bd847dcd6d586d0bc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Feb 7 09:44:26 2012 +0800
Change the destination of cp for separate targets to use the same bitcode file.
commit fcbdbad05f6efb2316baaf323468c0fce6d75afd
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Feb 7 09:34:00 2012 +0800
Fix a bug - In Relocation::symValue, check if symbol has fragmentRef if it's a section symbol.
commit b619f47e3748a7bb374c08ea1797a1195e2d308e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 21:12:10 2012 +0800
Get rid of the use of GNU objdump and strip in regression tests.
commit a780fa6b61a5ee722f5c339736dc15b59a2a6cf1
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 16:47:29 2012 +0800
Strip the source file path from the object file for Quake regression test.
By default, Object files contain the path of the source file,
This will make the comparision of binary files fail.
commit 6a467f73017bc1bb37a7820b14e6b1e182b25459
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 16:46:15 2012 +0800
Add missing files for the regression test of Quake.
commit 011856411f364126dcd06ac0a38d27cdb0a75244
Author: Duo <pinronglu@gmail.com>
Date: Mon Feb 6 15:25:44 2012 +0800
Fix a bug occurring in merge operation of InputTree.
commit 5678e8e436192dcfbdb9225366d46afb56254f14
Author: Duo <pinronglu@gmail.com>
Date: Mon Feb 6 15:21:30 2012 +0800
Fix a trival bug of GNUArchiveReader.
We use the file name instead the symbol name when opening an external file.
commit 0c1303641bf9a65cc13923fe259a476716626d24
Author: Duo <pinronglu@gmail.com>
Date: Tue Jan 31 15:54:33 2012 +0800
Enable the functionality of reading thin archive.
Additionally, make the coding style consistent and refine the comment.
commit 4b31b16b29ee16a79057412209e4770b7cb75a8c
Author: Duo <pinronglu@gmail.com>
Date: Tue Jan 31 11:26:26 2012 +0800
Correct the constructor of GNUArchiveReader.
commit 240babefe0ad85f71f0d3a388c72e079438cbc2a
Author: Duo <pinronglu@gmail.com>
Date: Tue Jan 31 10:29:25 2012 +0800
Refine the commit of GNUArchiveReader.
commit a01335007c3aa7298761cfeb3868a8e6047cde84
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 14:28:02 2012 +0800
Add a regression test for Quake on ARM.
Currently running the regression test for Quake by binary file comparison.
Remove it when MCLinker has more separate regression tests.
commit 3b374c6bd177df731a32281a465484c0a33ffaff
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 14:17:36 2012 +0800
Move the regression tests of Relocation to test/ARM/Relocation.
commit 001e7b3d1bf806b36e21ad3a7f4a04e5d703852e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 14:12:54 2012 +0800
Add a regression test for ARM got0.
commit 6d71742e9d57608d247914e74d1304887155e19c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Feb 6 14:08:17 2012 +0800
Add a regression test sample to demo how to use variables with FileCheck.
commit 0c134b8d22b6b0bdf187ca42eba4ea7886c5c8cb
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 3 22:44:08 2012 +0800
Fix a bug in PathCache.
Missing the assignment of the parent path for the first entry when
read it in open_dir().
commit 5345f6c466b7b08c9ebd2ee468cbec82a55d9cc8
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 18:07:10 2012 +0800
Fix a bug - MCLinker should only add new symbols in the output symbol table.
commit e5e842f5ef4120d735682d036b384a6a9fdd7b02
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 11:19:23 2012 +0800
Increase version number - Quake2 Android is linkable on ARM Android.
commit 69f99cb08cd9ab9c711191919f0141390638d913
Author: Zonr Chang <zonr.net@gmail.com>
Date: Fri Feb 3 12:13:45 2012 +0800
Refine the comments.
commit 82d5f80792a60746734e81d4190c7ecad9cb4e0f
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 02:52:18 2012 +0800
Enable TargetLDBackend::allocateCommonSymbols()
commit 19bf25970b446b110373a62eb0ee15c85557e274
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 02:48:27 2012 +0800
Add allocateCommonSymbols to TargetLDBackend.
Although different formats allocate common symbols in different section, but
all formats have steps to allocate common symbols. So, we add a new API
TargetLDBackend::allocateCommonSymbols() and implement it in different targets.
Some targets, such as Mips and X86_64, have different need to allocate
common symbols. Their LDSection, the definition of common symbols, etc. are
very different. So, we leave the implementation of allocateCommonSymbols() to
the lowerest target backends.
In ARM and X86, a basic allocation is implemented. But Mips needs small symbol
support.
commit 13b6580af224ec8d33880812e957fb98c8c0094c
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 02:47:19 2012 +0800
Fix a bug - because there are may different BSS section, we should not fix the name as .bss.
commit 81c4562ece94ef540cc67832bdd9300e7cf50f02
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 02:44:47 2012 +0800
After allocation of common symbols, all common symbols must move to Global category.
So, we add SymbolCategory::moveCommonsToGlobal() function.
commit 2931aa2f26d38f7c4d9c4673ed614a16db431e77
Author: luba <lubatang@gmail.com>
Date: Fri Feb 3 02:44:05 2012 +0800
Add TLS symbol type
commit 8c337e71d8b6aa7d2791f481296ff6af4fca24a1
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Feb 2 19:37:24 2012 +0800
Add Group section kind.
Let ELFReader can recognize group section first.
TODO: implement group section support.
commit 5f448bce6fb5c6035d0b3832db9a4c08c2edc3ec
Author: luba <lubatang@gmail.com>
Date: Thu Feb 2 18:55:15 2012 +0800
Refactoring - by Simon's suggestion, change the reserve/applyPLTGOT to general reserve/applyTargetEntries
commit cd3459a3959f0a6f22745248436c1b0d16f170bd
Author: luba <lubatang@gmail.com>
Date: Thu Feb 2 13:59:36 2012 +0800
Increase the version number - Quake is ready to run on x86 Android.
commit b980efbdd0ce5d45cb64638129f57f829a4d1e2c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Feb 2 10:16:27 2012 +0800
Refine error message in ARMLDBackend
commit 83d05ff948cfa7ceed5b5fb5f846787bd51dc684
Author: luba <lubatang@gmail.com>
Date: Thu Feb 2 01:00:09 2012 +0800
Fix a bug - if the symbol is in the output symbol table, arrange it. Otherwise, add it.
commit cd028c67baa8d30ca9c9bbbb32c84d240f0c8d13
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 22:44:45 2012 +0800
Fix a bug - ResolveInfo in the pool does not mean it is already in the output. We should still add it into the output.
commit 11e74bd8ba338ba7a9c8a2511c8acc330e4f704c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 1 20:41:20 2012 +0800
Refactoring - using comparison of pointer instead of string compare.
commit 9d266c741ff9ea5f5d4e731facaac739ad0bbb24
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 1 20:33:17 2012 +0800
Reorder pass 7.a - add standard/target symbols before read and
scan relocations.
commit 2642f21bbe8578fc1f72f54578fe17e6aa810045
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 19:57:45 2012 +0800
Add SymbolCategory's unittest.
commit b5dfaa011bddfacc9ebb95e4923a278ec6267e24
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 19:20:36 2012 +0800
All reasons of force local should be the same.
commit 99c9f72b76b566b6acef86e4aeae63da10068116
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 19:00:05 2012 +0800
Fix a bug - If a symbol is existent, we should not add it into output again.
commit cc6ffef4605b544581305cacff7bb2771886f05b
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 18:59:17 2012 +0800
Fix a bug - In Darwin, GCC 4.2 forbit inconsistent template reference.
commit af22c32a6676cd7eb3512a78a6f5cd01dbcc4218
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 17:16:36 2012 +0800
Change API - MCLinker::defineSymbol<POLICY, RESOLVE>(), add the 2nd template
argument.
Backends request a new defineSymbol() function - the new one can define a
symbol, but do not resolve the symbol immediately, just override the existent
symbol.
Therefore, MCLinker add a new template argument - RESOVLE.
If RESOLVE is MCLinker::Unresolve, then defineSymbol() defines a symbol and
overrides it.
Else if RESOLVE is MCLinker::Resolve, then defineSymbol() defines a symbol
and resolve it immediately. Just like the old behavior.
commit 572e320a34bdd4603933ae54314b2c121c1d92ab
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 17:14:40 2012 +0800
Fix a bug - Creating a new symbol should be treated as overriding an old symbol.
commit 1782eb764ac34b8dfb501905a949ddfff6cbedbb
Author: luba <lubatang@gmail.com>
Date: Wed Feb 1 17:13:47 2012 +0800
Refine comments.
commit 5281d5dbb2081c18ffab6aad14b5413c67237824
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 1 16:19:03 2012 +0800
Modify API - TargetLDBackend::scanRelocation
Add a parameter pInputSym which is the input LDSymbol of
relocation target symbol.
We need to update value in relocation place (A value) if it's a
ABS type relocation and point to a section symbol. This value
should be the offset to the output section. We needs the
input section symbol to get the correct output offset if several
sections are merged to single one.
commit 421b256fa93912dcdadc3cb28ee15a3719e3257e
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Feb 1 15:49:46 2012 +0800
clean up the code in Layout::layout()
commit e8d6546fd6a39f3f7fbaf9d7a209bddf911508ea
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Feb 1 15:43:12 2012 +0800
Refine the code - add assert to check if segment pointer is NULL
commit f7095c27f9af7545c5e6301a5ca896d952220694
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 1 10:54:02 2012 +0800
Fix a bug - For R_ARM_ABS32 type relocation, no need to check if
it is function or not in helper_use_relative_reloc
commit 82c5d35e1e3ab0c5eb5cf149ecc20a3c6bef41fb
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Feb 1 10:14:30 2012 +0800
Refine code.
commit d753d4811dd53af51c6b7e39ef4a596fd0af67f8
Author: luba <lubatang@gmail.com>
Date: Tue Jan 31 16:16:36 2012 +0800
Fix a bug - MCLinker should not crash when it's a shared library.
if we build MCLinker as a dynamic shared library, it will crash when we load MCLinker twice.
This is because we use a static local variable in a function.
commit cb593166652d96f05f90804b4039e181a711076b
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Jan 31 15:58:32 2012 +0800
Fix the types.
commit 71242fae4bb7cb25f304ef77e1316ec3b8c842c7
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Jan 31 15:30:50 2012 +0800
Clean the code.
Remove unused variables.
commit 94d18868919ffac706abaac2c7c96149154993fa
Author: luba <lubatang@gmail.com>
Date: Tue Jan 31 15:02:27 2012 +0800
refine comments.
commit 822525dc3f1c1d9be6f99aed79996f56a969e5a4
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Jan 31 14:26:48 2012 +0800
Add basic ARM/ABS32 relocation test.
For verify relocation, we may need some tool to get the instruction of a
given address.
commit 594b934cbedce9c16e885658557f83eb8aa2b5e6
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Jan 18 15:33:39 2012 +0800
Fix TestSample.o.
commit bbcf2855efffd3932e3516bc630af2b77f907c5e
Author: luba <lubatang@gmail.com>
Date: Tue Jan 31 14:47:31 2012 +0800
clean up code.
For clarity, use incremental addition.
commit 2162ef32bdea1484841b14a0455ab0fa5d4e1eb8
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 31 11:41:06 2012 +0800
Use isPIC to check ouput type during scanRelocation.
commit 59fd2f8b6db678b4200417fe4a714d5a76cf12f2
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jan 31 10:35:45 2012 +0800
Avoid summing up sizes of .ARM.attributes sections of input files for output.
MCLinker uses the .ARM.attributes section of the first input file for output.
The size of .ARM.attributes in output is same as the one in first input file.
there is no need to sum up size for ARM.attributes section.
MCLinker will emit .ARM.attributes section in correct way in the future.
commit e834ac1392db08ad7b36b26632ea690d2f5ff73f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 31 10:49:33 2012 +0800
Recover change - using comparison of pointer instead of string compare.
Because the GOT symbol will be created after creating the GOT section.
We won't gete the pointer of GOT symbol until creating GOT section.
commit bd7730cb5f687d15c6c2db14556ef039183fa9e5
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 31 10:05:05 2012 +0800
Refactoring - using comparison of pointer instead of string compare.
commit 8d797f5fe21047f8bdfbccf517d60d32d9c7058a
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 31 09:51:53 2012 +0800
Clean up code - move out create GOT from createX86PLTandRelPLT
commit 787c86546655e3683642f8e159490fe3f35ebeb3
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 31 09:26:32 2012 +0800
Refactoring - For clarity, replace zero magic value by NULL.
commit 27ace9924d4c527b152778651cf6dcdac9a4c6e2
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:56:11 2012 +0800
Refactoring - using comparison of pointer instead of string compare.
commit 9f19f0c3af66bc925e3fda66cf918ee412ed4cd6
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:50:15 2012 +0800
refine comments.
commit 15b9c8ca41cf13230f53353c5ae19bcf138c755c
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:46:03 2012 +0800
clean up the code.
commit 4c7611f090f3baca46568573ed614bfb49b73133
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:43:54 2012 +0800
Refactoring - For clarity, replace zero magic value by NULL.
commit 801d4ec509e24dd819bfb2bcd3bb6647224ca9dc
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:27:55 2012 +0800
Refactoring - Move some trivial functions from ARMLDBackend implementation file to header
commit 37e04b69d3c976175dce2a049158dd6bb6159928
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:21:07 2012 +0800
Refactoring - change the structure of emitSectionData from if/else to ripple if/return.
commit edc03b8cf64f9fb6db777fcf7b5b21fd09f49ddf
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 16:04:56 2012 +0800
Refactoring - move the details of emission of ARMGOT from ARMLDBackend to ARMGOT itself.
commit fc57a81e73498745db6e9bb1dbfc9a79bb4f89ec
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 15:58:01 2012 +0800
Refactoring - move the details of emission of ARMPLT from ARMLDBackend to ARMPLT itself.
commit 65b49f4d6e4da078f1e6237dd3e50ce6f0962a28
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 15:44:25 2012 +0800
Refactoring - auto-variables' names should be lower-case words.
commit cde5fec451a408232244039ead6513d41683ae19
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 15:26:09 2012 +0800
Refactoring - apply GOT and PLT should be done during doPostLayout(), not during emitSectionData().
commit 6c5b7068bfaf560ef64a255cc0236109e0afc872
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 15:06:35 2012 +0800
Refactoring - select file format first. This can remove many duplicated code.
commit 33eab96e81b3598c026076cdbf0d300fb7fd2eff
Author: luba <lubatang@gmail.com>
Date: Mon Jan 30 14:57:44 2012 +0800
Refactoring - in order to keep encapsulation, we should use Output rather output's type as input arguments.
commit 39e6850693a2960a3dec84f9ce674c21ac429ba9
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 30 14:10:04 2012 +0800
Avoid const cast in emitProgramHdrs
commit 88e8f4035870f5807a1c62d368274b53e67d5544
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Jan 24 09:16:41 2012 +0400
Small cleanup of OutputRelocSection class.
commit a1dca7451e684791374fd9dd2dcae196993d75b5
Author: luba <lubatang@gmail.com>
Date: Sat Jan 21 22:38:22 2012 +0800
Refactoring - remove some stupid interfaces.
commit e088bd0415d86efd20d01ca5c43f3e964c4325e8
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jan 20 09:13:43 2012 -0800
Properly handle R_386_PLT32 without PLT entry
commit 004516520594d691b776fa7eb1f94efb864fdddd
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 20:44:46 2012 +0800
Remove unneeded header.
commit a4e931b52d501eb2152723bd79ce5573c88b16d7
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 20:34:00 2012 +0800
Add class X86GOTPLT.
X86GOTPLT is simliar to ARMGOT.
It is used to emit .got.plt section on X86.
commit bc0fa7d5596471b57e0939fb18de95a7d130c216
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 19:45:11 2012 +0800
Revise comments, no functionality changes.
commit 6ea1c6822197c98fa968e8dd53504742156c36da
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 18:08:49 2012 +0800
Reorder function declarations and add comments.
No functionality changes.
commit d8f0ed69ed5cafc94bac8ba360994d960f99abb2
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 17:24:52 2012 +0800
Remove friend functions in ARMGOT.
commit d68176ad2fed547ad7f80a9addde572a6fd20d4a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 16:30:51 2012 +0800
Refactor some code in applyPLT1() out into applyAllGOTPLT().
commit 4103e6bec356a08aa45b8c8872ba35f0ccbd0576
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 16:19:08 2012 +0800
Use iterator to process all GOTPLT entries.
commit 0a0f270f89393870a2e9fc2835f920752ba886f7
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 15:16:00 2012 +0800
Start refactoring ARMGOT and ARMPLT for reusability.
1. Rename general got entry to normal got entry.
2. Refactor some code out into reserveGOTPLTEntry().
commit e5160ae90cb87de069f4f8f9de820133c9168276
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 20 18:06:09 2012 +0800
Avoid string comparison in getSectionOrder functions
we can get the LDSection from ELFFileFormat and compare it with the given
LDSection directly.
TODO: Review the ELFFileFormat for executable and object files.
commit 76e3041eed22558131dc0f1235168e3338f0bd7f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 20 15:10:31 2012 +0800
Refactoring - ARM/X86/MipsDynRelSection to general OutputRelocSection
Because the output relocation is format- and target-independent,
we move origin DynRelSection from ARM/X86/Mips to Target.
The original ARM/X86/MipsDynRelSection have totally the same
functionality. Now they share the same structure.
commit e82a5cbc98a2194ba91d2bc74654dc727259072b
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 20 13:20:34 2012 +0800
Adjust the section order of .got and .got.plt in X86GNULDBackend
commit a609d1ec135d702ab9369ab94c0a305021af433a
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 20 13:19:37 2012 +0800
Refine ARMGNULDBackend::getTargetSectionOrder() since ARM has no .got.plt
commit a4379af62da91cc3c948acea49d26beb652648e4
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 20 13:18:07 2012 +0800
Minor code refinement in GNULDBackend::getSectionOrder()
commit f766140caeed2478e7d99ffbdbae5676b8253d14
Author: luba <lubatang@gmail.com>
Date: Fri Jan 20 11:33:01 2012 +0800
Remove obsolete code.
commit 1def14764c99de206929bc599fb949e023588d84
Author: luba <lubatang@gmail.com>
Date: Fri Jan 20 10:56:33 2012 +0800
Remove obsolete code.
commit d59be6e9457e93a552b44c9c36e46cd0d129d765
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 20 10:02:17 2012 +0800
Increment position counters for local symbol and common symbol after insertion.
commit f73f6db8bc672707990a1a735117cd9e5add9d99
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 13:14:31 2012 -0800
Check if the symbol is preemptible on x86
It is x86 part of commit 8ba9c4b54a360cb3d3253b1b56a8afe0317f53bf
for arm.
commit 4a213c598051fc0a53f26edf30b85ffab5883cff
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:58:09 2012 -0800
Replace isSymbolPreemtible with isSymbolPreemptible
commit f190b4771a51918d1768c73256cd3f6c30d1e7f2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:44:05 2012 -0800
Implement X86RelocationFactory
Known limitations:
1. Only shared library support is tested.
2. There is no TLS support.
commit 1769226d41b7190b37e2f4193d3757860fb7ef25
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:35:52 2012 -0800
Implement shared library support in X86LDBackend
It shares many codes with ARMLDBackend.
Known limitations:
1. Only shared library is supported.
2. Only PIC input is supported.
3. There is no TLS support.
4. It doesn't use .got.plt section.
commit ed1c3740140cd1f0312becc1104450affb80854b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:31:54 2012 -0800
Add X86DynRelSection
It is copied from ARMDynRelSection.
commit 13479a0d785747e0f84f18cbeb9416505711b65c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:20:15 2012 -0800
Add x86 GOT and PLT support
X86 GOT and PLT support is based on arm GOT and PLT support.
X86 and arm share many common codes in this area.
commit aa4f6ce3277acfaf24d6a015a4474799556eafc7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jan 19 12:04:05 2012 -0800
Add m_HasGOTPLT to indicate .got.plt support
We can avoid GOT0 entries with .got.plt section so that we don't create
them if PLT isn't used. To support .got.plt section, we must combine
.got section and .got.plt section into a single GOT.
For now, x86 doesn't use .got.plt section. We always have GOT0 entries
in at the beginning of .got section even if PLT isn't used.
commit e2f5694303e3c21c44f45f8074521fe7b702e033
Author: luba <lubatang@gmail.com>
Date: Fri Jan 20 00:55:29 2012 +0800
Fix a bug - The order of the symbols should be "File" -> "Local" -> "Common" -> "Weak" -> "the rest"
commit 7207ac264dddf47c282062e5c39ef641f3e1d220
Author: luba <lubatang@gmail.com>
Date: Fri Jan 20 00:53:52 2012 +0800
ResolveInfo adds a new friend class MCLinker
commit daeb39431219944cd79303c8fa514ead5949efd1
Author: luba <lubatang@gmail.com>
Date: Fri Jan 20 00:53:19 2012 +0800
Refine comments.
commit a5e65e7843af4303e8b29aac2926c539661fe003
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 19 22:13:21 2012 +0800
Use co-variant return type to return target-specific dynamic section.
commit cb86c80b01c35c83dd1da47aa4557acf98a5d7aa
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 19 20:13:27 2012 +0800
Implement DT_PLTGOT for ARM and X86.
DT_PLTGOT for Mips is still unsupported.
MipsELFDynamic::reservePLTGOT() and
MipsELFDynamic::applyPLTGOT() need implementation.
commit 6f4e4a327d278e46ba3d2904ae7a611e2c293906
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 19 16:31:01 2012 +0800
Add virtual functions for DT_PLTGOT entry on various target.
commit 24164f8c8810fea57e087c4cc939a2f9a060b5ef
Author: luba <lubatang@gmail.com>
Date: Thu Jan 19 16:14:35 2012 +0800
Refactoring - let different target backends can implement its own dynamic section.
If a target backend need its own dynamic section, it can override dynamic() and
use co-variant return type to generate its own dynamic section.
commit 8ba9c4b54a360cb3d3253b1b56a8afe0317f53bf
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 19 11:49:27 2012 +0800
Fix a bug - check the symbol is preemptible
when attmpt to generate ouput relocation of R_ARM_RELATIVE type.
commit 53a5a14283d3ea03d5c74607bd2eda7c44105b76
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 19 10:33:49 2012 +0800
Modify API - Relocation::apply and RelocationFactory::applyRelocation
Add parameter MCLDInfo for applying relocation.
commit 1a52a94dd9e5858b551d643d5f7ead8fe83b12c9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 19 09:22:42 2012 +0800
Fix 80-column violations.
commit b85a3dbe8fb1b20f442b8b40de8c87b748902559
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 18 10:39:15 2012 -0800
Update comments in ELFWriter.cpp
commit d5341a19812027751915a1750c5f25494d1cee9d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 18 10:36:19 2012 -0800
Handle SHT_DYNAMIC section in getELF64SectEntrySize
commit 671b356aa5152c00f992e89fd2861818b533716e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 18 09:44:07 2012 -0800
Handle SHT_DYNAMIC section in getELF32SectEntrySize
commit 013edf93ccefdba1d9743fd08fc5370d6497f561
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 18 09:39:18 2012 -0800
Fix another typo in comment
commit c22ce3fd9839b6b809e9728d910fb07dac67eca9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 18 09:37:24 2012 -0800
Fix a typo in comment
commit 36f89e2c2659807ae273f6993b85792f678ccced
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Jan 18 14:50:28 2012 +0800
Fix bug: PLT is not in thumb mode.
commit 8fda3164400240239cbb0f85e0c1fa839db4a5a9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 18 14:23:03 2012 +0800
Implement ELFWriter::emitRela
commit 2b23a398b1aa2e97142aba856cc34ef1090f0cb3
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Jan 18 12:09:27 2012 +0800
Fix typos.
commit b26c74a9a119f38b116c4712cbb2d8509dd11f77
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 18 10:58:08 2012 +0800
Check if output relocation type is valid during scanRelocation
commit b0e75c73eb2f069f1a4e2ac565996cbe2bbaba8d
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Jan 18 10:46:46 2012 +0800
Fix typo.
commit 9aea15094a1e69258066fdbf6dbd592178b5c526
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Jan 18 10:37:56 2012 +0800
Add a sample object file for relocation testing.
commit 748f5c777796f3a49ff20383d5e6cdc95dec2b60
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jan 18 09:50:36 2012 +0800
Replace delete by free() for the memory space allocated by malloc().
commit 65d345de14f0a19c91c97dbdd45744010f6b7f4f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jan 17 10:02:35 2012 -0800
Emit program headers for x86
commit e741f76fa3177a74c888851c9b494e95b1db50dd
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 22:41:01 2012 +0800
Increase version - 1.6.0-open
In current version, Quake can be linked on ARM Android.
commit 07040cd7a7fb37ac0e800d83d6f7c77f04c7b89f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 21:21:18 2012 +0800
Fix a bug - Write back relocation target data to correct place
commit 3fd03f0f18d093a241d9b883e7cbe6838e515f6e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jan 17 20:42:00 2012 +0800
Fix a bug where modifying the last GOT0 entry unexpectedly.
commit 36b0ad0454ca0b0d3a035e7fd5d2d6ce008b190d
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jan 17 20:15:06 2012 +0800
Fix a bug where the iterator of got.plt will walk through general got entries.
commit 047549ec677b3728ce819fe447d286b9005e934b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 20:01:16 2012 +0800
Refine code, no functionality changed
commit 97d07ac833ad2cdd4956ddc57900462f024bcd37
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Jan 17 19:00:28 2012 +0800
Add an sample test.
This test will generate an ARM ELF object file and a dynamic share
object, and check the symbols and sections which are basically required
are exist.
commit 3f6e8610dea08566466defdab5c695b1544df44d
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Jan 17 18:46:48 2012 +0800
.ll treat as test files.
commit 5705123368ea0c47580d6379a5ab22b2865e078a
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 17:49:41 2012 +0800
Fix a bug - if the backend does not recongize the symbol during finalizeSymbols(),
MCLinker should take over the symbol.
commit 5b2d726dcf7d7727025381260a110d27727c6c2d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 17:46:12 2012 +0800
Modify API - TargetLDBackend::finalizeSymbol
Add return value:
return ture - if backend set the symbol value sucessfully
return false - if backend do not recognize the symbol
commit ae935e3cf795e1608a0113ce8cec3873bc854d7e
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 17:00:43 2012 +0800
Fix a bug - the scale of relocations is huge, so, we should not sync relocation-by-relocation.
commit f6d22bbc41fe828d0673c1b90ad470895a394379
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 17:00:20 2012 +0800
Add a new function - MemoryArea::sync()
commit 8ba345695fb31a6023e47edeed3f3a3af4ab1b9f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 16:21:39 2012 +0800
Set output relocation symbol index to 0 if it's R_ARM_RELATIVE
commit 400abcaa602b9ee8e49d685d8fb432c8b71e4f54
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 16:18:24 2012 +0800
Modify Relocation::symValue
If relocation meets a section symbol, set S value to
the output section's virtual address
commit 4fd17381cec853596d0824771cdf12eed2b2ddab
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 15:51:46 2012 +0800
Turn off CodeGenPasses if we're performing linking.
commit da9abb62f25779d122c0539e4358e3ffd7ab33d9
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 13:44:45 2012 +0800
refine code - add an assertion to check if a Relocation object has a valid symInfo.
commit e236324e5505674565717ac2e5cc8a4bc9516b08
Author: luba <lubatang@gmail.com>
Date: Tue Jan 17 12:15:57 2012 +0800
Fix a bug and conform to clang++ - we should not refer to a template argument.
commit afeb4519d3429d5359b0f4057c42364350300f1d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 12:11:19 2012 +0800
Fix a bug - Scan ABS type relocations
commit a83ddc8167383f761cf6b3f66db8bb526bb23fd2
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 17 12:06:01 2012 +0800
Fix a bug - do not report error unsupport relocation type when
applying relocation.
Because a symbol's reserved won't be 0 if it has relocations with
ABS32 and REL32 type point to it. In this case, we should generate
dynamic relocation for ABS32 type relocation and perform static
relocation on REL32 instead of reporting error.
TODO: Report this error when scanRelocation
commit 5046913407dbd8d15a11e308e1f1e939ae3fa3e0
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Jan 17 11:03:28 2012 +0800
Let Output be in build dir.
commit 6addb106e6a7b00ddd877cfe20278776d6f98da9
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 23:30:57 2012 +0800
Increase version - in current version, ARM Android plasma is ready.
commit 8951b13bed44207b4dd6b61afa15bf7ff03edb74
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 16 23:14:16 2012 +0800
Clean comment in ARMLDBackend::scanRelocation
commit 07189308b1956502ec1ae375218c7aa2cc27f158
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 16 23:07:15 2012 +0800
Add parameter MCLDInfo to TargetLDBackend::scanRelocation
In ARM scanRelocation, we need input options to judge the
symbol is preemtible or not.
commit f1de3601284cffa67cffc89e24de439b8d2c0874
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 16 22:15:49 2012 +0800
Don't modify variable within assert() statement.
commit 4c4cdbd3fdc8c08ac86a6ced57b15e5a08d045df
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 22:13:13 2012 +0800
Fix a bug - whether a relocation entry needs a symbol in .dynsym, is not
determined by ResolveInfo::reserved(). Relocation entry pushes the symbols
into force local by itself.
commit 29c432726133bff7c8f1319690bb98bc551f268c
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 20:27:21 2012 +0800
Refactoring MCLDFile and MCLDOutput - setSOName should be in MCLDFile.
commit 3a975dd5e0fa9b32899f63e5926c8ef337d27318
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 16 20:12:22 2012 +0800
Fix a bug - do not report error when applying relocation with
branch type if its target symbol's reserved() is not 0 or PLT
Because there might be a symbol with GOT and there is another
relocation with branch related relocation type
(CALL, PLT32, ...) point to this symbol, and we no need to
generate PLT entry for it. In this situation, the symbol's
reserved() won't be 0 or PLT, but it's still correct and we
should perform static relocation on it.
commit f275631743978a7483a165f49cf1cbf01e6486c2
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 18:28:34 2012 +0800
Fix a bug - Undefined and dynamic symbols should have zero size.
commit 39a3709f54c41b3131c94440e7b1aecad7e658c3
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 16 18:17:03 2012 +0800
Fix bugs - ARM relocation applying functions
We may generate a got and a plt entry to the same symbol,
so we should take all these situations into consideration
when applying relocation.
commit 65e1c0e732509a2ed2603f5cf7196e480b79f120
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 17:41:26 2012 +0800
Fix a bug - if a symbol or a section can not be found, use zero index.
commit d1575fc2169271f9e1a62d14b10a746ae8af0da5
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 16 17:31:21 2012 +0800
Refine the code to set SONAME
commit 0b354cbf50d949f0871bf03b7e7738da307f3f75
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 16:42:37 2012 +0800
Fix a bug - a undefined symbol meets a dynamic defined symbol, should use the
undefined symbol's binding.
commit a472f2a1710a7359c1b761d877ca2caa739ed9bb
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 16 14:45:06 2012 +0800
Change data to Nop if applying relocation meets a weak undefined symbol
and we didn't generate a plt entry for it.
commit fe6bec3c29d0696ffd3cc00029a232bcde78eff9
Author: luba <lubatang@gmail.com>
Date: Mon Jan 16 14:12:58 2012 +0800
Fix a bug - section symbol should stay at Input's LDContext, but do not
get into Output's LDContext.
commit bea7b1b44f68085b8061e17f5dde244b64190312
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Jan 16 12:11:26 2012 +0800
Fix a bug for DT_JMPREL and DT_PLTRELSZ.
Values of DT_JMPREL and DT_PLTRELSZ should be decided by .rel.plt section.
commit f035c318c05d9bffba3f7faadd1da27f652fef59
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 22:27:13 2012 +0800
Fix a bug - MCLinker should write down the symbol's value no matter if the
symbol is absolute or not.
commit 50af09e996bc24b3d747c1abaf1fe71a677e99d4
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 22:10:01 2012 +0800
Fix a bug - Finalize symbol value should use SymbolCategory, not output's symtab().
commit d162a1222c9b1a7906844a8d63cee07ed155cef5
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 20:38:15 2012 +0800
Fix a bug - Output's LDContext::symtab should be maintained before emitRelocation
move emit NamePools before emitRelocation.
commit 164c0a4b5ddde790f2a6c4b4902964fd04b84ec2
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 20:37:27 2012 +0800
Fix a bug - LDContext::getSymbol by name should skip the first symbol.
commit a6deea7cb4c5c8b4a5cd1de2a855c2697d2de5d7
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 20:37:02 2012 +0800
Remove redundant creation of first ResloveInfo.
commit a61badd2124703d0dd50f61f1bd096b54a7c45f6
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 19:52:23 2012 +0800
Fix a bug - the symbol index of the output dynamic relocation should correct.
commit 04b9a93c70987f5156b1c4da3a9e4bfb15698725
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 19:50:39 2012 +0800
Add iterator for SymbolCategory.
commit 9a6175b5d9c3f34aabae14704fb3181126c2c25d
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 19:49:48 2012 +0800
Add new ConstIteratorTraits and NonConstIteratorTraits for getting the right iterator.
commit 5fca0980f01296b628eb52d3ef1a86648ef01799
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 19:48:51 2012 +0800
Summon old SymbolCategory.
commit 5b7a347544a3d96d2a9427f528953f3adece2fc3
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 13 17:10:03 2012 +0800
Refine MCLinker::syncRelocationResult
commit 4440c9ae6b3ebf94e7a38581d945262e801c9d3e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 13 16:41:47 2012 +0800
Add function MCLinker::syncRelocationResult
Move write back relocation target data from applyRelocations
to this function. Relocation target data shold write to
output region and should write after all section data has
been written, so that it will replace the input data to the
relocation applying result.
commit 995b415ce3097b8ab6361a12acaf0e60266568d9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 13 16:39:14 2012 +0800
Add API - MCLDDriver::postProcessing
Let MCLinker do any needed modification after all
processes.
commit 4b6ef391f36547de5255eb1a00fc8388e701cafb
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 13 14:14:57 2012 +0800
Refactor ELFWriter::emitRel().
No functionality changes.
commit c59b007bae34fbd219014bdd16fe64a34b186b53
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 13 11:21:58 2012 +0800
Split out emitRelocation() into emitRel() and emitRela().
No functionality changes.
commit 31da795373a3cb7ce2dfa8fcd66b1522545d7ac3
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 13 09:48:50 2012 +0800
Refine formant
commit b829cf34ecaceeb32384efc9ac2bde7c7c5f369c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 13 09:45:58 2012 +0800
Fix a bug in function ARMPLT::applyPLT1.
Apply right value now.
commit ea018e93504c468c58b200b0cc47c27fb5e87460
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 13 09:01:01 2012 +0800
Use virtual address to apply PLT[0] and PLT[N]
commit 80e6ec1088f5ebeb21c454e75cd71863f3724692
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 03:16:15 2012 +0800
Fix a bug - dynamic symbols should have 0x0 value.
commit 4cc20c0afcb8c9ec43aded25a60d7d5cfaf19c6c
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 03:05:11 2012 +0800
Fix bugs - MCLinker should maintains the output LDContext's symbol table.
commit 839d95a416b3a71fcbe5dfe914a39251b70c28ff
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 03:04:39 2012 +0800
Add a new function - LDContext::getSymbol by name.
commit 9aa004ae51eb8cfe89b79a4b872a87994575999f
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 01:37:41 2012 +0800
Fix a bug - dynamic symbol's output section should be undefine.
commit 95e23aeb035a5dacefc3f2e83f534b47b02f280f
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 01:20:09 2012 +0800
Fix a bug - local symbols should be read but do not resolve them.
commit a3483669541e8def1e7880ac64b161f928a095a4
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 01:19:46 2012 +0800
Fix a bug - the first symbol need to be inserted.
commit fd906f7b5aa90d156e1279bc9522643b19372ac2
Author: luba <lubatang@gmail.com>
Date: Fri Jan 13 01:03:36 2012 +0800
Revert ab3d09e014f6
revert "reading symbols from the symbol table's first not local symbol."
Because relocation entries need local symbols, we read them but do not
resolve them.
commit ab3d09e014f651d8b5618ad79d145886ff30d8d4
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 20:31:44 2012 +0800
Fix a bug - the first entry of the symbol table should not be put in LDContext::symtab().
LDContext::symtab() is used to group symbols into different file. It's not use to maintain
the index of input symbols.
commit 1e1e8825efd95b2a9828838d114871ef481e0ace
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 20:29:10 2012 +0800
Fix a bug - the first fragment's offset and order is not set.
commit 8c5bc4a3994cab28939969ade167b145bd9bddf9
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Jan 12 18:29:00 2012 +0800
Set up input shared objects' SONAME for DT_NEEDED
commit 0aa76f98a3eb0d5f7be17f19869dc2f1ae681b00
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 12 17:49:50 2012 +0800
Modify ELFWriter::emitRelocation
Set output relocation r_offset to virtual address
when buiding .so or executable, otherwise set to
section offset.
commit 528d7f35853befc4a1646081bf339500dd21c37c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 12 17:27:47 2012 +0800
Set GOT reserved entry value when emit .got section.
commit 9737942ead9c2fb6177cd33e09bc98b64a6ee29c
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 16:45:20 2012 +0800
Refactoring - let TargetLDBackend::initStandardSymbol() become a pure virtual function.
Because different format-dependent target backend should implement its own initStandardSymbol,
I leave it as a pure virtual function.
commit 1ba759878f57b6084e49112bf02b8579ac72cbfe
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 12 16:24:07 2012 +0800
Prevent relocations from double free.
Relocations are double free by both iplist and GCFactory.
To temporarily solve this problem, we new relocations
directly instead of allocating their memory space by
GCFactory.
commit 9fe80774372f17b878447e0fa8155290cf7a3f22
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 12 16:13:31 2012 +0800
Write back Relocation target data to MCFragment
commit 3e42c0eae9264e93fecdebbdece54d67f716f4e5
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Jan 12 15:58:35 2012 +0800
Fix hash section size calculation.
The number of symbol table entries should equal to nchain.
Therefore the previous fix is wrong, now revert it.
commit 1480a43ccec6ab5f445ac8832c50b177c2b0bf50
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 14:11:52 2012 +0800
For performance, remove redundant malloc().
commit 3b8725ed4dd1e69239cadef98070656b119a31e5
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 13:48:58 2012 +0800
Set up DT_SONAME.
commit d53a0f7f722707476a7b4857dd57968e21565441
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Jan 12 12:59:12 2012 +0800
Revert "Fix GNULDBackend::emitDynNamePools() to handle hash conflict correctly.", to
maintain the same chain order as gold.
This reverts commit 605f04d198ed521d9697707aa0d88cfded04da5b.
commit 605f04d198ed521d9697707aa0d88cfded04da5b
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Jan 12 11:56:37 2012 +0800
Fix GNULDBackend::emitDynNamePools() to handle hash conflict correctly.
commit f65b48e0c7707b8d1f5db89f89713d63171a3e9b
Author: luba <lubatang@gmail.com>
Date: Thu Jan 12 11:55:03 2012 +0800
Fix a bug - should not override existing bucket.
commit d9bd4b564e0da97dbb4d3da41c34b73fd88718f7
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Jan 12 11:17:48 2012 +0800
Fix .hash, .symtab and .strtab size calculation.
Symbol table already contains NULL entry, no need to write it again.
Hash table size calculation should get rid of NULL entry.
commit ceb5a8994c5d8e2a6874eb26b70b4035ac1fc3bc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 12 10:33:56 2012 +0800
Update ChangeLog and VERSION.
Trivial cases generated by llvm-mcld have worked on ARM. For example,
the shared library, whose source code only has "int g = 3;", works now.
commit 4d45efa22f97db79decf47b3c2a33a268955d5d5
Author: Zonr Chang <zonr.net@gmail.com>
Date: Thu Jan 12 09:01:30 2012 +0800
Include missing header <set> and fix naming.
commit 5347b51798e938af883b52ce591977f2046fc405
Author: luba <lubatang@gmail.com>
Date: Wed Jan 11 17:57:07 2012 +0800
Fix a bug - First symbol in both .dynsym and .symtab should be NULL symbol.
commit 2fc92c746ab376a44895b503061d1acd3143d41d
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Jan 11 17:51:30 2012 +0800
Fix another typo for DT_SYMTAB and DT_STRTAB
commit 5245cca946c4258c5b0eeff923115264b6b35e47
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Jan 11 17:32:37 2012 +0800
Fix typo for DT_SYMTAB and DT_STRTAB
commit fa6ebb87afcf5bf8b06f7fb05056025e7c26f794
Author: luba <lubatang@gmail.com>
Date: Wed Jan 11 17:15:04 2012 +0800
Change the defintion of MCLinker::defineSymbol.
Because some symbols need to set as a local symbol forcefully, so we
should separate MCLinker::defineSymbol() into two functions:
MCLinker::defineSymbol<AsNeed>() and
MCLinker::defineSymbol<Force>()
There two functions are both inserting symbol into the symbol table and
resolve the symbol immediately.
MCLinker::defineSymbol<AsNeed> is just like Google gold linker's only_if_ref.
If there is existing an old symbol, the symbol is not defined until the
old symbol is a undefined reference.
MCLinker::defineSymbol<Force>() defines the symbol and resolves it, no matter
if the existing symbol is a undefined reference.
commit cff88c952e1b0806f4f8449cca46b6ff05046b64
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Jan 11 14:43:43 2012 +0800
Update the output section index as final section ordering is known
commit 5f56778a19faa529a4ee4cb2e939b89a15843a70
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 11 10:39:25 2012 +0800
Move define symbol _GLOBAL_OFFSET_TABLE_ from
ARMLDBackend::initTargetSymbol to ARMLDBackend::createARMGOT
In scanRelocation, if we meet a relocation with the
symbol _GLOBAL_OFFSET_TABLE_, we should define this
symbol immediately to let the relocation get the
resolved symbol which we defined. And that the correct
judgement will be processed for this relocation.
commit 722990656bb7aec860669391a92f9644920962be
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 10 14:36:31 2012 +0800
Fix a bug - ARMDynRelSection::reserveEntry
should reserve number of pNum entries
commit 5093c3bff9b26e199aaa33cf17a6786060b8d18f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 10 14:31:45 2012 +0800
Modify RelocationFactory::produce
Check target and host endian to make sure if byte swapping is needed
when generate target data for relocation.
commit 40aed57bc0eba6834e13bfd2462c563c4c0f8363
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 10 14:30:00 2012 +0800
Move byte swapping functions from ELFReader.h to SizeTraits.h
commit 52fa03aa90430d45a6861e32e9164a8451d9ea34
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 10 11:22:37 2012 +0800
Refine formats
commit ecba32742706bf7369d472a933b0491e27762b6c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 10 10:37:16 2012 +0800
Fix a bug - RelocationFactory::produce
No need to shift the target_data after copying because
we only copy the needed byte from fragment content.
commit 9d2fc5986573e36949fe6a0694a92068156fd073
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Jan 10 10:21:17 2012 +0800
Fix ARM PLT32 relocation bug.
The REL addend of B, BL, BLX should do 2-bit left shift
after extracting from instruction.
commit d22942580c47d168c6b44c0d12331c8e110629e3
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 10 09:30:35 2012 +0800
Emit program headers if output is so or exec
commit e1b21c08eb57828b2f8c4d48d04310790c4c9711
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 19:59:01 2012 +0800
Minor code refinement. No functionality changed.
commit deacd848bdc8fbfad6331e32fdf34336275f6898
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Jan 9 19:34:10 2012 +0800
Replace strcmp by address comparison.
commit 70b3e196b104ec518fc6056f7d39eebe69a256db
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 17:42:46 2012 +0800
Refine the code to calculate mem size of ELF segments
commit f8a85823f66cdc3f76b0fd6816b584cd11041df9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Jan 9 17:25:24 2012 +0800
Emit the section .ARM.attributes directly from the input file.
commit b070fc27aad35afa8551b665af79a174359303b7
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 17:14:49 2012 +0800
Refine the code for PT_LOAD segments in GNULDBackend::createProgramHdrs()
commit 934175c2a96571854a0c9df3c79c8c0b67e39f88
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 16:09:40 2012 +0800
Refine the SectLinker's constructor interface.
Values passed to the constructor of SectLinker (and its derivatives) are now
all in SectLinkOption.
commit b4f7b155285b5183a3d7f5627cfa5a4a7c9482f2
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 15:33:30 2012 +0800
Let SectLinkerOption start playing its role -- in that way, we're able to seprate the user input (from command line) processing from SectLinker.
commit 377e533ecc5dde6ab10f714ed19abf2d02059b21
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 14:56:54 2012 +0800
Interface change: SectLinker::addInputsBeforeCMD() and SectLinker::addInputsAfterCMD()
are suppressed to
SectLinker::addTargetOptions().
commit 0015c8922cf82d31a279157004167adc1c65ee44
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 14:35:50 2012 +0800
Interface change: pass SectLinkerOption to the constructor of SectLinker instead of MCLDInfo (SectLinkerOption has already contained this.) This invloves the interface change from LLVMTargetMachine to all derived target- specific SectLinker.
commit 1111a1723034142fab1645281e4679ca2b3b0dfb
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 14:34:48 2012 +0800
Introduce class SectLinkerOption. This will be used later to seprate the "data" (i.e., user input from command) from the library (SectLinker itself).
commit 478a5f7e2b90fc5b46819e61e174dcb3e3cf7238
Author: Zonr Chang <zonr.net@gmail.com>
Date: Mon Jan 9 14:33:23 2012 +0800
Refactor class PositionDependentOption out from class SectLinker and introduce "derived PositionDependentOption" to handle different kind of options.
commit 1a1f4e448b5f87d9e8f846f8cb56755225cdc6c8
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 16:38:49 2012 +0800
Not include .bss in output if its size is zero.
commit d960a402d99f6534eca4c5ff72a067b9e2ddae5c
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 16:35:00 2012 +0800
1st ELF PT_LOAD segment should include ELF file header and program headers
commit eec23b196dfc13b543c35c9198d2e69434331c91
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 16:16:52 2012 +0800
Add functions to get the first/last section in ELF segment
commit 3f35b2331065e27df2b4bc6337f7845fc68942b9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 9 15:49:13 2012 +0800
Fix a bug - GOTEntry::getSize return correct entry size
commit 69975829d19e4df1b0cf749edd02e2e8a4d10a87
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 9 14:48:18 2012 +0800
Use virtual address of .got and .plt section when applying relocation
commit 4abd0ac66e9fa9c5a155ffcc7b8a45ec8aee8ee6
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 9 14:38:43 2012 +0800
Define _GLOBAL_OFFSET_TABLE_ simultaneously when .got created
in ARMLDBackend::doPreLayxout
commit 13912532aac8d7ec25fa1b5d791eb7683c512595
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 9 14:20:10 2012 +0800
Use virtual address as S and P value for applying relocation
1. Modify Relocation::place - use LDSection.addr() as base address
2. Modify Relocation::symValue -
Symbol's value is set to virtual address before applying
relcoation, so we can take this value directly as S value to
apply relocation.
commit 3111407b46b766028e3d0665ece0b8ea0b9dedcf
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 14:02:56 2012 +0800
Correct the alignment to byte alignment
commit b80e0a538cc8a0e4402dd4ccb372a0c9f61f0678
Author: luba <lubatang@gmail.com>
Date: Mon Jan 9 13:55:57 2012 +0800
Change the bug reportee from Luba to mclinker@googlegroups.com.
commit 2ced0a42910e2ea516d6249a211fe41f922b997e
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 13:30:03 2012 +0800
Refine the function to get section order
.dynamic is changed to NamePool
commit 4baefc969db0d7f0c8dd0411359ab0a5fe0673d4
Author: ras46 <Robert.Lai@mediatek.com>
Date: Mon Jan 9 09:55:35 2012 +0800
Remove '#include <iostream>' and 'using namespace std'.
commit 9842d170066e6ec6482b3e3e0c99ffaa570d3c9e
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 9 09:46:16 2012 +0800
Correct the segment flag for .dynamic
commit 40924a00ae4f3b984659f4917cfec5f7c86503fe
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 23:03:09 2012 +0800
The symbol's value should be virtual address. If the symbol is
reserved by target backend, call back target backend to finalize
the symbol's value.
commit 757b7f29e436b394d746c266727dc43ce399b85d
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 22:26:47 2012 +0800
Open the getSymbolShndx() - now the symbol's shndx should be right.
commit 52a7cbeea0a7ce37e614d812eca8387905b7e45b
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 22:24:37 2012 +0800
Fix a bug - because we merge section when reading them, we don't
need input's STT_SECTION symbols for relocation. Skip section symbols
when reading them.
commit 93094ab3afa4851ce71abb7302fdc4d5a05426e8
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 22:23:24 2012 +0800
Remove obsolete comments.
commit c766a6b40c849da0d1dc2ff3e0d40f27db13b3cb
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 18:35:16 2012 +0800
Add a new function - LDSymbol::hasFragRef().
This function return true if the symbol's fragment is set.
commit 60a6a7679134bbb70db1d2cf40bcdca213cf3b1e
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 18:19:22 2012 +0800
Fix a bug - Local and absolute symbols' binding should still local.
commit e85a4f3117722767e5048b9ec3b9b1c4e438a5a2
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 17:58:56 2012 +0800
Refactoring ELFDynamic and GNULDBackend
1. Move .dynamic section's initialization from GNULDBackend::prelayout to sizeNamePools
2. Move MCLDDriver::measureNamePool() into MCLDDriver::preLayout()
commit 59fe697fade87471541b1cafe5ef53afdfdbc096
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 17:57:37 2012 +0800
Refine ELFDynamic Section
move applyOne and reserveOne to .cpp, and add some parameters for debugging.
commit 47fcaef2d6bd77f21042ba36a6d5fa9dbfbd2733
Author: luba <lubatang@gmail.com>
Date: Sun Jan 8 16:31:25 2012 +0800
Refine rules - if a symbol is reserved or external, add it into dynamic symbol table.
commit f46efc738d24306d50dca76ce7723365e31f4fee
Author: Diana Chen <diana.chen@mediatek.com>
Date: Sun Jan 8 12:17:43 2012 +0800
Clean debugging insertion
commit a2e6d1ef62a5ec9dbebdf13e1ea8f99e22986942
Author: Diana Chen <diana.chen@mediatek.com>
Date: Sun Jan 8 12:14:13 2012 +0800
Modify Reocation::symValue
For symbol with no FragmentRef, return its symbol value directly.
commit eb4971267340e343a302970458bd1041fd853eab
Author: luba <lubatang@gmail.com>
Date: Sat Jan 7 23:06:29 2012 +0800
Fix a bug - Any symbol with hidden or internal visibility should be treated as a local symbol
commit 924a15117daeefd4b61ec208299272783e0cb90c
Author: luba <lubatang@gmail.com>
Date: Sat Jan 7 22:55:44 2012 +0800
Fix a bug - A protected symbol coming from a shared object must be treated
as a normal symbol
commit ea958dd27e39060da2bb1de1cb4e57996140385f
Author: luba <lubatang@gmail.com>
Date: Sat Jan 7 22:43:23 2012 +0800
Fix a bug - ignore symbols from the shared objects:
1. local binding STB_LOCAL
2. STV_INTERNAL
3. STV_HIDDEN
commit e1e6b960018afbe7e311acffe949f5e2c04fecc2
Author: luba <lubatang@gmail.com>
Date: Sat Jan 7 22:21:38 2012 +0800
Fix a bug - a symbol defined in a section which iwe are not including must be
treated as an undefined symbol.
commit 5463c4953fbcb13ecab5c305d60cc9593c7b7cd8
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 23:34:33 2012 +0800
Apply new ELF .dynamic section on all backends.
commit 258d871b28a35422a28d0a2ab3aced610cfce9c6
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 23:34:11 2012 +0800
Implement common .dynamic section for all ELF backends.
commit 32c86db8a4edbac688eb834f9329a1ee60d8139e
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 23:33:41 2012 +0800
Let .dynamic section become a kind of NamePool
commit 91c7317bd0e5f650357e1b41e48c423af7d2ab07
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 23:32:41 2012 +0800
Implement many hasXXX section checking functions.
commit 8c9e44d5bed5229b9c6ec8c35ae6b995880a56c0
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 6 23:20:54 2012 +0800
Emit program headers in ARMGNULDBackend::postLayout()
commit 4990a37724326287b637a1421c184e26d807e322
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 6 23:20:24 2012 +0800
Implement GNULDBackend::emitProgramHdrs()
commit 2ccc45ab9b0a65d8110a17b87021c7ded49221d5
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 6 23:18:14 2012 +0800
Add pagesize() to define page size of the target machine
commit 7ebcaecff7ed237e7a677083fd14e1c242660adf
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Jan 6 22:45:25 2012 +0800
Add ELFSegment class.
commit 354fb454a82328e702143402a6e75d35af4d5c7a
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 6 20:02:52 2012 +0800
Modify symValue() and place() in Relocation
Use file offset of the symbol and the place being relocated
as S and P value for applying relocation.
commit e6595f2dbad20beadd335d9734016fdb5f31e27b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 6 19:28:35 2012 +0800
Modify createARMGOT/ARMPLTandRelPLT/ARMRelDyn in ARMLDBackend
In ARMLDBackend, directly get LDSection from LDFileFormat instead
of getting from MCLinker
commit b0f74c4d889d438922a03367e753890ce873a4c3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 6 15:50:06 2012 +0800
Do check before generating dynamic section entries.
commit 629b78c40069fedf0c2270170aca853ef35d1e60
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 15:05:01 2012 +0800
Implement finalize symbol value.
commit 8ce6932dad00ed0a4ab9df56fc321a7d6dfd1474
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 6 14:11:19 2012 +0800
Fix a bug - fix typo of Rela to Rel
commit cdc28be2dfd86e4c5901d34a4061cfdc91091251
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 13:47:10 2012 +0800
Fix a typo. MCLinker::finalizeSymbols() should have no parameters.
commit a13bb7e0e666219d668aebddb67aaa721db9a61b
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 13:44:47 2012 +0800
Refine format.
commit 7fdbf6aa4762ce24cee534ac9bb0753e61fab254
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 13:44:22 2012 +0800
Enable MCLDDriver::finalizeSymbolValue
commit 903de0b94bdddf262a662c377f7fa0ed246aa237
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 13:36:03 2012 +0800
Enable TargetLDBackend's preLayout() and postLayout()
commit dc4ceddb70bb11381910cfe4a8f780ae58b6f02b
Author: luba <lubatang@gmail.com>
Date: Fri Jan 6 13:19:57 2012 +0800
Fix a bug - symbol resolution should not override the ResolveInfo's pointer to output's LDSymbol
commit e9124e2f59c421515f43875d089203ee455a9d1a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 6 12:23:37 2012 +0800
Enable ARMLDBackend APIs to call the implementation of .dynamic section.
commit 9623085a64401cfecc93fa51796e830fcdb518c9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Jan 6 11:40:58 2012 +0800
Fix bugs - Add missing ++it in while loop
commit a197b269f33054978400a996b6565b556ec91a9f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jan 6 11:02:30 2012 +0800
Move the implementation of .dynamic section to ARMLDBackend.
commit 00434aeac60ef334e4c2ea84216eae646bb6f673
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 21:14:22 2012 +0800
Fix a bug where re-pushing MCFragments into MCSectionData.
commit 17a10d49c18bed780d5a6248f4aa2b895b62bbf6
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 21:09:04 2012 +0800
Fix a bug - MCFragment pushes itself into MCSectionData at constructor.
Therefore, any one should not push MCFragment into MCSectionData again.
commit 3993c7dfa8b58d79177af00a5bf60345bb989b4f
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 20:36:28 2012 +0800
Fix a bug - reader should set up output's LDSection size
commit 8c5946523705c90bbc892b99d7f1ce6659a8e878
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 20:16:42 2012 +0800
Enable target backend's initTargetSymbol().
commit 207711864c208b4ed977828a35a6d8b16d411126
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 20:14:43 2012 +0800
Implement GNULDBackend::emitDynNamePool
commit 5e9b12711f9330cc8569b9850038b44eded9ba6e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 5 19:38:33 2012 +0800
Add APIs - TargetLDBackend::preLayout and postLayout
create .got section in ARMLDBackend::preLayout while
building shared object.
TODO:
1. create .dynamic section
2. create _GLOBAL_OFFSET_TABLE_ symbol when creating
.got section
commit 7e5b753e38ddb50f70ec638a2362156fc7577632
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Jan 5 18:54:32 2012 +0800
[ARM] Correct the Section flags for .ARM.attributes
commit b21adcf07e8241228c30339cc97a8fb4d09b931e
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Jan 5 18:50:35 2012 +0800
Remove the code to set section size and refine some code in Layout
commit c17a7cb792d53775e84aabe007644d04c0d9a1ad
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 18:02:30 2012 +0800
Calculate the size of .plt section for LDSection in ARMPLT.
commit 40c92724cb55cdb6bafa311c1e71840e8f7b423b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 17:43:36 2012 +0800
Calculate the size of .got section for LDSection in ARMGOT.
commit c5ca8210193a6f56529f276fb7926ad35ca79d4a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 17:15:27 2012 +0800
Add empty emitting functions for DT_SONAME and DT_NEEDED.
it has no need to deal with DT_SONAME and DT_NEEDED in emitDynamic(),
Using empty emitting functions here are for skipping assert check.
commit d5bf56a171160bb91876e68633127213c364af0b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 17:06:51 2012 +0800
Change the type of .dynamic section to LDFileFormat::Target.
commit 57fe477031c194b2c0475064821fb6d040f8b8ed
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 17:00:00 2012 +0800
remove obsolete code.
commit b00a118399e1a2c6756af082c22ed8aa896cabde
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 16:57:44 2012 +0800
Remove obsolete code.
commit a5ec28fff10512dc3c6f4c2342d404176ef8378e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 16:16:44 2012 +0800
Fix wrong assert statement.
commit f59f4adda2206a57c15004da974e430d5790a802
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 5 14:02:21 2012 +0800
Add API - TargetLDBackend::initRelocFactory
1. initRelocFactory - create and initialize RelocationFactory
2. Modify getRelocFactory() to only get RelocationFactory but not
get or create RelocationFactory
commit 114b828359228ffd7d55ee76835833f1c25cda81
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 12:18:32 2012 +0800
Fix a bug - Dynamic symbols which do not in the relocatable objects, should not be pushed into dynammic symbol table.
commit a1f691c2db4cde4e31ab9cbb4c1bc164d03b03a0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 11:49:01 2012 +0800
Update unittests for the changes of MemoryArea.
commit b24215aae5f56abfa57d80900f46e2d24418ab20
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 11:34:13 2012 +0800
Fix a bug - ELFObjectReader::readRelocations should check if the
LDSection::kind() is LDFileFormat::Relocation.
commit 9e013dce25d8f6ca908bd92ba1474461324b7640
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jan 5 11:23:08 2012 +0800
Remove Layout from emitDynamic() function prototype.
commit cbc854ffa91959d5e44021a266059b3f68ac4709
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 5 09:59:08 2012 +0800
Remove debugging insertion
commit a2c2fc755b5499ae1dcea1c9b5adccad1f36317c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Jan 5 09:54:51 2012 +0800
Fix bugs - create symbol _GLOBAL_OFFSET_TABLE_
1. Ask layout to create FragmentRef for this symbol.
2. The size of _GLOBAL_OFFSET_TABLE_ is 0.
commit c04430036f58b5c199377203bb6380348b17e4d6
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 04:19:22 2012 +0800
Fix a bug - when layout, the fragment list of MCSectionData should not be empty.
commit ed1a19489f3dc1986eb57d6f9159fbae35601e1c
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 04:11:27 2012 +0800
Fix a bug - In current verion, MCLinker merges sections when reading
them. So, the offset of the read fragment should be set.
commit 4a0c98a5e2b572ca57b27599ccc85ab254661641
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 04:09:48 2012 +0800
Refine the error message.
commit f0a5228dcec061ef8855cdc4acab276c1d0b811c
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 03:22:53 2012 +0800
Fix a bug - Layout::isEmptyRange() causes segmentation fault when
the range is the first element in the range list.
commit 1e5a9a2fb1453045c5e1621c58d973f0b3afdd1b
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 03:03:18 2012 +0800
Fix a bug - Even dynamic symbols ask Layout to get their FragmentRef.
Since dynamic shared objects have no MCSectionData, Layout should
return NULL when the symbols's st_shndx points to no MCSectionData,
should not report fatal error.
commit c682c31a5fae0760e07cfe291a336e86df8026a4
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 02:49:44 2012 +0800
refactor the relationship between MCLinker and Relocation
relocation's fragment reference should be set by format-dependent readers,
not MCLinker. Transfer the responsibility from MCLinker to ELFReader
commit 99f069f0b8f37a936bdaedcfc818bec4272aef70
Author: luba <lubatang@gmail.com>
Date: Thu Jan 5 01:55:01 2012 +0800
Set up sh_info and sh_link in input's LDSections.
commit ef9e73ed4cfe3e2701ccc978282dfe2bb35cd3ae
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 23:15:03 2012 +0800
Fix bugs - There are some relocation entries point to the
undefined symbol, and undefined symbol has no fragment reference.
These undefined fragment references cause segmentation fault when
applying relocations.
The bug source is: in ELF, the relocations' fragment references
come from relocation section's sh_info, not from the dynamic
symbols' st_shndx. So, ELFReader is responsible for set the
LDSection::setInfoLink() when reading relocation sections.
The same problem is easy in MachO, because MachO's relocation table
is within the section. There is no extra effort to get the relocations'
fragment references.
commit 9ee8d31b4f39f4dda6d6472b18e50ffb64d52d6b
Author: Zonr Chang <zonr.net@gmail.com>
Date: Wed Jan 4 19:59:47 2012 +0800
This patch suppressed the number of warnings when builds the MCLinker under Android compilation flags.
It includes:
1. Trim spaces.
2. Initialization order.
3. Comparison between signed and unsigned number
4. Uninitialized loop iterator in include/mcld/LD/ELFReader.tcc
5. Move mcld::fs::exists(FileStatus f) and
mcld::fs::is_directory(FileStatus f) from Path.cpp to FileSystem.h
commit 079c579fe2f79451c763a4b022a7ff1e193d2664
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jan 4 20:30:26 2012 +0800
Add the Implementation of emitting .dynamic section.
commit 9ce9285a4a997b33c3ea53e19ed0e43b4cd694b5
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 4 18:02:50 2012 +0800
Modify ARMLDBackend::isSymbolNeedsDynRel
Add parameter isAbsReloc to check if symbol needs dynamic
relocation when building shared object.
commit a3dbe9ca13b0461731155d9fe97cd61dd6eab3c3
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 4 17:58:14 2012 +0800
Fix a bug - we can't emit dynamic relocation with type
R_ARM_MOVW_PREL_NC and R_ARM_MOVW_ABS_NC
commit b28327cf3385aaeb15556471547f2fe391f2678f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Jan 4 16:34:07 2012 +0800
Fix comment and refine error message
commit 54f5511857354e612782cfe8df3f44a96062b2d0
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Jan 4 01:31:55 2012 +0400
Add one reserved entry on Mips GOT initialization.
commit 7a2ee69ef80f5d9a473bedd4daa1998f93cc6f1a
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Jan 4 01:08:13 2012 +0400
Add a bit more MIPS flags to the ElfXX_Ehdr::e_flags.
commit e347611835616bd346e5609226c054033db80f86
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Jan 4 01:03:33 2012 +0400
Add namespace qualification to the R_MIPS_HI16 constant name.
commit 3011400c7be9ac02e75c4cf6070b2d1a6a120786
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Jan 3 15:53:53 2012 +0400
Implement MipsGOT::reserveEntry() and MipsGOT::gotEntry() routines.
commit f4b82d455e287d7797c3deebf9e07ce59423a1e8
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Jan 2 15:21:44 2012 +0400
Extend the list of Mips relocations processed by the MipsGNULDBackend::scanRelocation() routine.
commit ad6e2eda57c9fe9db930dce4daac725b88161219
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Jan 2 14:24:18 2012 +0400
Move _GLOBAL_OFFSET_TABLE_ processing to the MipsGNULDBackend::initTargetSymbols() method.
commit 6ceb028677045e69d4c2aa6df50314451dd26163
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Jan 2 14:21:49 2012 +0400
Add begin()/end() methods to MipsGOT class.
commit a11f8bcd3be88f45629d9ce4b83849de7f086446
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Jan 2 14:02:34 2012 +0400
Refine MipsGOT code.
commit 93d6e506d075066b83ca2bb8f4030ff5f611f414
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Jan 2 13:23:42 2012 +0400
Refine MipsGNULDBackend code.
commit 53a8d13f75241e7e94a2b8810a9c762dadafa272
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Dec 31 00:34:41 2011 +0400
Refine MipsRelocationFactory code.
commit 8d9ae90a8bc8f515aa5c14b21f5e5f986c169518
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Dec 31 00:14:29 2011 +0400
Add new entries to the DECL_MIPS_APPLY_RELOC_FUNC_PTRS macro.
commit 15f2df15f4c378509423ccc5f208ba4f45a475d2
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 00:30:46 2012 +0800
Remove rslinker, and use our own readers.
Sorry for the big patch, but I think this is the last big patch.
commit d42ee92511c1f85308d568d5538d98cec852ef65
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 00:29:49 2012 +0800
Fix a bug - should determine if the fragment is NULL before using it.
commit 8b5c813f53b9dccbf3d86ec80a59013338e0fc49
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 00:28:34 2012 +0800
Fix a bug - the default semantic of Memory::request() should be read-only.
commit a6ca15f9831efb58aac4804d795db27558b8446e
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 00:27:13 2012 +0800
Fix a bug - Layout should return a MCFragmentRef<NULL, 0> when it can not find any fragment.
commit 1b7dffa62857466b6f54d1a6f8b083c49ce9c1fe
Author: luba <lubatang@gmail.com>
Date: Wed Jan 4 00:26:30 2012 +0800
Fix a bug - Add missing llvm::ELF namespace
commit 8a1293d064e9b6c0bc4a92f0e758fca730f5e164
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 20:45:44 2012 +0800
Fix a bug. Refine loop boundary condition in Layout::orderRange()
commit 3c3b5ca1ad50204a20c74a6890c717cdc9346111
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 19:58:54 2012 +0800
Fix typo in ELFDynObjReader::isMyFormat()
commit dc441ccc8ec5acba47820a3edb0c5d38a6338af4
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 17:55:07 2012 +0800
Remove the code to set LDSection address.
We should base on "Segment" to set section address, and this part will be done
in post layout.
commit 8564c3f2e0726d608ef4242f8ee484c0d424d7c4
Author: ras46 <Robert.Lai@mediatek.com>
Date: Tue Jan 3 19:47:54 2012 +0800
Use MemoryArea::page_boundary() to find the page-boundary that larger than file-offset.
commit 11661c9b489b7a21c2b0ae3c2ba5517a0bd58109
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 3 19:09:29 2012 +0800
Fix a bug - ARMDynRelSection::getEntry
commit c721fa8050ab969a7be7f4cd529fd65fb560c01b
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 15:26:59 2012 +0800
Refine comment.
commit 988a531b6b32125128132207f85fbdcc4cb87004
Author: Zonr Chang <zonr.net@gmail.com>
Date: Tue Jan 3 16:05:14 2012 +0800
Fix build when --with-unittest was not given.
commit a4c9f6555118c2cc51f6f51b6bfcf5b41616d3bd
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 14:57:47 2012 +0800
Add mapping rules for .ctors.* and .dtors.* in SectionMap
commit 5f485803471db9be08229da3d6cc1ef105fafd63
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Jan 3 13:49:18 2012 +0800
Add .init and .fini in ELFFileFormat
commit 39f4cc4245c6fe2b502c49a119f2be507bc3cb45
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 3 11:59:04 2012 +0800
Refine format
commit b92287ed88cdad5c43946a70cc750b0a3a3b8e3c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Jan 3 08:52:03 2012 +0800
Fix build failed
commit 47207c00b9f2c41548e836c2006b8974c49a7dfd
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 22:08:43 2012 +0800
Refine format.
commit b869a4e0b42d2d1cbfa70939262c106a064515ee
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 22:07:43 2012 +0800
Refactoring - move TargetLDBackend::machine() to GNULDBackend
commit 5e84179fb316af641a675e718c2b809db89f81cb
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 22:05:59 2012 +0800
Implement byte swaps.
commit 55a981e5a252604981efa07b1c6bda6d2e9ee9be
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 2 20:05:12 2012 +0800
Add ARMGNULDBackend::getTargetSectionOrder()
commit 470e0593cb2def7e7967d0fe50c7b9b5445485da
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 2 19:59:34 2012 +0800
Implement GNULDBackend::getSectionOrder()
commit 80aaa308441ff3f89061dca90f48b316161a1ff5
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 2 19:58:34 2012 +0800
Define the basic section orders for ELF format
commit 34b348d1909089dcb2dd8f134d67c82f5bebdf78
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Jan 2 17:19:30 2012 +0800
Modify ARM relocation functions
commit 80d202a5358c2ee2636eddf6500de71d5033ed95
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Jan 2 15:58:56 2012 +0800
Enable testing make.(When "make check")
commit 630cc7219c262687e41d32ac6777fd286eb53b75
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Jan 2 15:57:25 2012 +0800
Fix testing config bug.
commit 54b997780caa11cb2b43a018b46a42951b76d784
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Jan 2 15:56:48 2012 +0800
Remove testing temporary files.
commit b7f0f9721ccf21ad13e29c64525000633f635307
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 15:55:22 2012 +0800
Refactoring - collect all MemoryArea::request in ELFObjectReader and ELFDynObjReader.
commit ae0c1babf8bf969f8058178ce24929da976412d2
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 15:37:14 2012 +0800
Refactor ELFReader: eliminate the number of using MemoryArea::request.
commit 5c9b26645d64822d729b867d9a41c6035e930a77
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Jan 2 14:56:06 2012 +0800
Uncomment emitSectionData() and do little modification.
commit 46b1162de3d85ddd4270e0c809b0fbf951beceef
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 2 14:17:22 2012 +0800
Refine comments.
commit f7637d41b45dbb63264493b00047a7884f9e78cc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Jan 2 12:14:11 2012 +0800
Complete the member function emitRelocation().
commit 80eff6b9386ab4a403f81d23948b5897ba75abe8
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 12:07:13 2012 +0800
enable backend's scanRelocations().
commit 9b2a4151960babbbe0469c480122a61cd6f56e69
Author: luba <lubatang@gmail.com>
Date: Mon Jan 2 11:31:39 2012 +0800
open MCLinker::prelayout() and postlayout() for Backend
commit 559c32fd7c500e5e37821f09f96e24858c35203e
Author: Duo <pinronglu@gmail.com>
Date: Mon Jan 2 11:22:41 2012 +0800
Move m_fileOffset from MCLDFile to MCLDInput.
commit 972d3974e99d12105bf23e69fddcd780d4e4528d
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Jan 2 11:13:58 2012 +0800
Refine comments.
commit ac57f5127d1c83087b53239882993ab31e886284
Author: Duo <pinronglu@gmail.com>
Date: Mon Jan 2 02:04:22 2012 +0800
Add a varable "fileOffset" for class MCLDFile.
For a member object file of an archive, we need the start address
in the archive. Add an variable for class MCLDFile and set the value
in GNUArchiveReader using the member function of MCLDFile ,setFileOffset.
commit 7133194501e161b8dc81da0aa67b1c187f5bf8c1
Author: Duo <pinronglu@gmail.com>
Date: Sun Jan 1 09:41:44 2012 +0800
Complete isolated GNUArchiveReader without thin archive.
MCLinker can't still work with GNUArchiveReader.
We need some unittest to confirm the correctness of MCArchiveReader.
commit 0c722d32b54ef5c2c7e44733f94ce6d4f744e8a2
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 30 17:57:36 2011 +0800
Add LDContext::getSymbolIdx() for writing out relocation table.
commit 3ea85fd32cc03757cf0e9f9df52ff181d1e31ac5
Merge: a2c2655 6b5b4fd
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 17:47:55 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 6b5b4fde7be7c121b7f59551f30aed104c973c1f
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 17:46:16 2011 +0800
Fix a bug - produced relocations need to set up input's ResolveInfo.
commit 19e1aa9e96eb921563a7d46044518c847799f515
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 30 17:45:28 2011 +0800
Implement Layout::getFragmentRef from the big offset
commit a2c265577bc39af4d4fa8857dd0d9f2d1047cf7d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 17:45:59 2011 +0800
Modify ARM relocation applying functions
R_ARM_MOVW_PREL_NC and R_ARM_MOVW_ABS_NC
commit e47dbf5641357d4507bb4786e89f9d5a52323e2a
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 17:45:11 2011 +0800
Add assertion if ResolveInfo of relocation not set while scanRelocation
commit 2d38016e4cd23bd518c5dc6dc4e331d50c82ee06
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 30 17:39:58 2011 +0800
Fix wrong virtual address calculation.
commit 208b75256dc7a75b1829f99d9801147bddc09114
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 30 17:28:10 2011 +0800
Implement ELFWriter::emitRelocation().
It is unfinished.
commit 1a0da05a617f89191149b66a826a9a570c67bc01
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 17:23:01 2011 +0800
Enable `MCLDDriver::relocation()'
Implement MCLinker::applyRelocations() and related functions.
commit f442311b9f19067fc57d842cecc72a7d406446a2
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 30 17:08:19 2011 +0800
Modify the return type of Layout::getFragmentRef from the big offset
commit 35bcb06c79acdfb4fae7ccfaed0bb807fa33921e
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 16:57:02 2011 +0800
Implement MCLinker::addRelocation.
commit 142fd33c403f38e15899c062ecb0427c86a7a1d9
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 16:55:36 2011 +0800
Open Layout::getFragmentRef from the big offset.
commit 09e22e7c3d506a4f18861570f702551d19322104
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 16:43:00 2011 +0800
Modify ARMRelocationFactory
1. Implement relocation function prel31,
2. Refine some judgements if got entry is needed
commit 2a13eda6730cb64eccbdc2a67ec80a6a70e1b409
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:49:17 2011 +0800
Implement format reader's readRelocation().
commit 9fd370ba93f84bfc4435dcc249c4c4326b952cdc
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:48:04 2011 +0800
add LDContext::getSymbol()
Because we may change the definition of LDContext::SymbolTable, LDContext
better provides this API.
commit 6b545fe85b908aa333ec5078592d9da6799b57b4
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 30 15:19:11 2011 +0800
Refine format
commit 0fc01b92e9c82eda9f0d01f983c1cb47283bf605
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:11:52 2011 +0800
Fix a bug - if the section name contains any "debug" sub-string,
the section should be a LDFileFormat::Debug section.
commit 9b4233273a69f35e32ecb20c5ff592f23e98293a
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:02:49 2011 +0800
Enable `reading relocation entries'.
commit 98cb9c290428a715bd13bdd38ce2aff65991aef2
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:01:19 2011 +0800
Refine format.
commit dfbabd99b3db7afd45871b6c42bfc3c392dabbc7
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 15:00:15 2011 +0800
Make a note - we should make a map from section name to section
index to speed up the querying.
commit 031a2951ba8879f797be707c3ac98ecdf82ba6a6
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 13:50:26 2011 +0800
refine comments.
commit ee080734e874ce1898c8545f84a718eb8aad2eda
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 14:17:31 2011 +0800
Modify ARMLDBackend::scanRelocation
check if relocation target symbol is _GLOBAL_OFFSET_TABLE_
commit 0fcbde36689d60916c76979269c813354b546273
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 30 13:54:00 2011 +0800
Implement get Input/Output LDSection in Layout
commit e5e02f694f04c4c935945b0d9ea5ac80570bd20b
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 13:45:02 2011 +0800
Refactoring the architecture - transfer TargetLDBackends from pure-abstract reader interface to format-dependent reader interface.
commit 3c4bc285ac00a9da71b2bbb196f4bbaccc994246
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 13:41:34 2011 +0800
Implement ARM relocation functions: abs32, rel32, gotoff32
commit 45f9be9be83195f01489b96f3ce756cafdfd2ecf
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 30 13:39:16 2011 +0800
Fix bug - ARMRelocationFactory::ScanRelocation
A place may still needs a dynamic relocation to relocate itself
although it jumps to plt.
commit b193909cd559cc3525400b83c0a0b13c578f0573
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 05:47:00 2011 +0800
Fix a bug - now can see the symbol name.
commit 81dc1faee5c769f4d6f2511da32f5886ca2e89f8
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 05:01:55 2011 +0800
Implement emitRegSymTab()
Some bugs are still remaining.
commit 239c2dca20ab3ecdcf1f3199fee82c8bc237f415
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 05:01:01 2011 +0800
Fix a bug - when read unsupported symbol, should ignore them.
commit b1ce25b502c8f6fa8cfeff1eb05a3d1e2d2c6a0b
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 04:58:01 2011 +0800
Fix a bug - when read unsupported symbols, should ignore them.
commit 3bffaf99bea88fe3b737879e5c1723baaa116558
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 04:53:03 2011 +0800
Add the default NULL symbol when MCLinker is initialized.
commit da75f8ddc0e233134c9368ff8d61a9f1b594340f
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 04:51:30 2011 +0800
refine typo of comment.
commit 885c6853421646bc2e1144e3b5affc7c7d3f4244
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 04:49:53 2011 +0800
Add Layout::getOutputLDSection()
The behavior of this function is similar to getInputLDSection().
commit fb9a3422a6bc8c67e6734cbd2d023c36afcb433e
Author: luba <lubatang@gmail.com>
Date: Fri Dec 30 04:48:33 2011 +0800
Add LDSection::setIndex() and index() to remember the input and output
section index.
commit 29af7ca5679947e78664aa7427ce15a44901004e
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Fri Dec 30 02:06:39 2011 +0800
Add missing `static' qualifier.
commit 74104917ecb1dd19f75156203cec87075a761a29
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 23:57:44 2011 +0800
Implement emitSectionData.
commit 25e2167c9071e3e8a37b789bb6b264ccb6c8b44e
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 23:56:56 2011 +0800
Fix a bug - the return type of MemoryRegion::getBuffer() should be wrapped by traits.
commit a5a20ca578dad98d4fd00f9ba52da39f01224c2b
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 23:02:18 2011 +0800
Fix bugs - the start address and size of shstrtab are wrong.
commit 6682993c962600895765db65bf3cf8942b1b77b5
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 22:59:34 2011 +0800
add template partial specific Align() functions.
commit 04d2cbf6e78844451c581f9017038ff8b54d8c64
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 21:13:09 2011 +0800
Fix a bug. Correct the type of a variable.
The variable is used to check if out-of-bound and should be signed in this case
commit 5d9d515c96b654b6b975123bae9236f39f4cc4ba
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Thu Dec 29 20:23:35 2011 +0800
We need to check if PLT of the symbol is exist to determine how to apply while applying relocations.
commit 3da54699c0df014ff7262a6b5f19602386e44fe6
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 29 20:12:00 2011 +0800
Define target dependent symbol _GLOBAL_OFFSET_TABLE_
commit 6b4dd3d8ba6191f3dbf5cfab8f961217f6fbbe74
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 20:04:58 2011 +0800
Pass MCSectionData to the constructors of GOT entries and PLT entries.
commit 33d9fafcda5d80777c2a7f9e059d75f5f373904c
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 19:04:30 2011 +0800
Add function Layout::getInputLDSection()
This may be useful in some scenarios.
commit 9893c832962113d2c16299bfaa86c98b7d1196e9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 19:07:25 2011 +0800
Rename m_GOTPLT to m_GOT. No functionality changes.
commit 83abffda34e3e677838763b6cab6a6d60e4db667
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 18:57:53 2011 +0800
Refine the function used to align an address
commit 6e9ab5d4b28ce9e3476ec2c2d129d16bc587a194
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 18:02:31 2011 +0800
Remove redundent ARMGOT::applyGOTPLT() function.
commit 6681d77383bedc6e19f70d0b8d3d9cc9235dfe21
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 16:19:09 2011 +0800
Handle target-dependent fragment in computeFragmentSize()
As applying relocations, we need to know the fragment offset in GOT/PLT from
Layout. Thus we still need to handle target fragments.
commit a7aa9cf925172716c9af35f2ae4db03cee33ef76
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 17:42:14 2011 +0800
Fix a bug - ResovleInfo.outSymbol() should point to output symbol.
commit b6a45fcfeeb6422bb0faa36d5ff6bbdc33ae2bb4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 17:36:33 2011 +0800
Fix some commented code in emitSectionData().
commit c0e795131aa133de61d1b9b73c0b601274977fa4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 17:19:57 2011 +0800
Add begin() and end() functions in class ARMGOT.
commit ba4cde9ab4af6e306a5ef1325c2e903519e76574
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 29 17:08:04 2011 +0800
Sorry to mis-merge the wrong file, ARMRelocationFactory.cpp
commit b3a9172c724cc20263ee8810cc48df4c436dc5e8
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 17:03:32 2011 +0800
Add the implementation of getGOTPLTEntry.
commit 65e695efbc913f2e3e03c5fd9c354fbb25a8d798
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 29 16:55:31 2011 +0800
Remove offset() in GOTEntry and PLTEntry
Now we let Layout to fill up the offset of TargetFragment,
so we should ask Layout for the offset to make sure the
offset is valid.
commit 8c6e3c68519a51dd66a5a02ce7993bcdb0a633e5
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 29 16:55:16 2011 +0800
Fix typo.
commit 09d4a89406b5cbaed26c6aa760881cf5a7f9c476
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 16:28:33 2011 +0800
Implement MCLinker::defineSymbol()
Because targets and driver may define standard symbols, MCLinker should provide API to do this.
commit 0656aef58bdb634150e17a2e4440af6c7c41c6ab
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 16:09:31 2011 +0800
Enable layout in MCLDDriver
commit fd9e6f7cd04b7250a722f33fca9f9db839bd31eb
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 15:59:11 2011 +0800
Implement Layout::layout()
commit 71fc72a4902204f5f8ba494434a97df772ca5696
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 29 14:37:31 2011 +0800
Add a helper function to align an address in SizeTraits.h
commit efb966bd7a23c71787ef6e40d0cd902512a801e9
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Thu Dec 29 14:50:40 2011 +0800
Fix bugs for ARM relocation functions.
Several minor changes:
- Fix some typo
- Add overflow checking
- Add missing addend if relocation type is RELA
- Refine R_ARM_THM_CALL (but still not work)
commit 7e9e873f3ca8d40af3d108b8f2e2a5628d7b41f8
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 14:21:54 2011 +0800
Add new class MCTargetFragment.
MCTargetFragment will be inherited by Target-dependent MCFragment.
commit 03fb34aa0cd42a4e438c4b0963302704bb8bd5f8
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 29 13:20:31 2011 +0800
Remove the class ARMGOTEntries.
Now using the class GOTEntry to represent all kinds of GOT entries.
This is for simplifying the design of GOT.
commit 2f901ad97abfc3473d7da889e6ab2ce55644d5ea
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Dec 29 13:13:06 2011 +0800
Implement helper_get_PLT_and_init().
commit 339f672b65bbab8a8d39d2eaae44f20dc2a12b55
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 10:29:45 2011 +0800
Reorder the linking process - move MCLDDriver::readRelocations() before
MCLDDriver::add STD/Target Symbols().
Previously on MCLinker:
1. readRelocations() calls TargetLDBackend::scanRelocations(), and the
TargetLDBackend computes the size of target-dependent tables during
readRelocations().
2. MCLDDriver::addTargetSymbols() calls TargetLDBackend::initTargetSymbols(MCLinker& pLinker)
3. TargetLDBackend::initTargetSymbols() calls MCLinker::addGlobalSymbol()
4. If user give a non-NULL MCFragmenetRef in MCLinker::addGlobalSymbol(),
MCLinker will computes the value of the symbol automatically during
MCLDDriver::finalizeSymbolValue().
Conclusion:
It's better to create all fragments before creation of target symbols.
Because we can not know if the target-dependent tables are existent until
MCLDDriver::readRelocations(), so we should move the function before
MCLDDriver::add STD/Target Symbols().
commit 8ec35b29b669eaf5c1a3f846fb7d27fbc91d4957
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 29 08:51:23 2011 +0800
Add API - ARMPLT::getGOTPLTEntry()
Get an GOT entry in .got.plt
commit fb0b6b11e3eb746ab0fa25794ddb6ac1fab4e530
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 04:13:21 2011 +0800
Fix a bug - ELF hash entry size should be 4 bytes
commit 45f0bb3b784c206c5bbb6bd5c28320c6579ddd94
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 04:02:16 2011 +0800
Implement MCLDDriver::measureNamePools.
Now, the sizes of .symtab, .strtab, .dynsym, .dynstr and .hash should
be correct.
commit 92877f4b0e66d3730b0732fe3232986b1afa4c15
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 03:59:26 2011 +0800
Let the input file remember if she's needed.
Option --as-needed ask linker to make DT_NEEDED tag only when the
shared libraries are needed. We let the input file has a flag to
remember if itself is needed.
commit 0a93330e9c1e8a2943d07cdd6faa5adbe331bbb8
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 03:57:44 2011 +0800
Move all access functions in ELFDynObjFileFormat to ELFFileFormat.
commit 184d13e6d3a63ca70ad0a94d142408ffa29007f6
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Dec 28 11:53:08 2011 -0800
Issue error in X86RelocationFactory::applyRelocation
Issue error for now.
commit aae6fac46a042df992db4e19ab5cc185b0922c8e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Dec 28 11:51:47 2011 -0800
Issue error in X86GNULDBackend::scanRelocation
Issue error for now.
commit fac17ed1f3f935ba2e51904e4b40103e8b8b2a95
Author: luba <lubatang@gmail.com>
Date: Thu Dec 29 00:19:57 2011 +0800
Add access functions in all kinds of LDFileFormats
commit 6ce4a39443493366eaf45c7cf024efce97278927
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 23:17:18 2011 +0800
replace \#include<stdint.h> by \#include<llvm/Support/DataTypes.h>
commit 7b443200f6e90b976d55de9ef4fd63080a37eaa7
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 22:16:22 2011 +0800
Initialize standard section map in MCLDDriver directly
commit fb7d9b0151880c358815ac85297c597f2b0fc490
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 21:30:53 2011 +0800
Refine R_ARM_THM_CALL relocation function.
Add some helper functions to handle bitwise operations.
- helper_thumb32_branch_upper
- helper_thumb32_branch_lower
- helper_check_signed_overflow
commit 0ab8fd07fd0c6da2fb65fa44542470bbf8081144
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 21:27:35 2011 +0800
ARMTargetBackend should initialize section by MCLinker::getOrCreateOutputSectHdr() directly.
commit 478ba9a43a99a3cb49d5d2cca6c7960631785200
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 21:16:34 2011 +0800
Change scanRelocation from trivial virtual function to pure virtual function.
Because all target backends need to override this function, so it should be
a pure virtual function.
commit 2dc7ee8d8dec91347d4aec062947f54563205835
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 20:55:51 2011 +0800
change the API of TargetLDBackend::computeSectionOrder() and TargetLDBackend::computeTargetSectionOrder().
Because targets rarely change the default order, so we use trivial virtual function instead of pure virtual function.
And we also shorten the function name. Use get instead of compute
TargetLDBackend::getSectionOrder() and TargetLDBackend::getTargetSectionOrder().
commit 25836ea267fc4c730cab810a6d90022c68d88559
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 20:49:46 2011 +0800
Refine the input parameter, size, for ARMDynRelSection
commit a9322558e204e54913ca6ad5fdbf12b518668d2f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 20:46:26 2011 +0800
Set section info of .rel.plt to .plt
commit dfc55f3a445c4d62c48ae9da3292609102626a28
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 20:37:07 2011 +0800
Give TargetLDBackend::emitSectionData() more parameters.
commit 4c19f36cf2d9585c7333d8d02819bb6558d7d695
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 20:20:58 2011 +0800
change the name MCLDDriver::computeDynSymTab() to MCLDDriver::measureNamePools().
This function computes the size of the sections - .hash, .symtab, .strtab, and so on.
commit ac61247f5a65e509f22199d16bc1fe157fb3c8a9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 19:36:10 2011 +0800
Get PLT/GOT offset by calling offset()
For target dependent section, Target is responsible to
maintain the MCFragment (Entry) offset. Layout consider
only the section size and has no idea about fragment
offset.
So, when applying relocation, instead of asking Layout
for the offset of PLT/GOT entry, we extract from the
entry directly.
commit ded73047105b31e8bc1d8b9973407b19a574958e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 18:03:14 2011 +0800
Revert ARMRelocationFunctions.h and ARMRelocationFactory.cpp
commit b2ca6a16105575802642b3da6fc0afc5b0e156f2
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 17:56:50 2011 +0800
Implement ELFWriter::getSectInfo()
transfer the responsibility of "set sh_info" from writers to LDSection creators.
commit a0be4a4883e2b03d817b87a48587708ffa7721ee
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 17:36:55 2011 +0800
Reorder if-else statements, no functionality changes. MCLinker should emit PLT SectionData before emitting GOT.
commit bfd99640d46a281fed6e611c539715f295325887
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 17:36:59 2011 +0800
Implement ELFWriter::setSectLink()
commit d274d7fb9c73a06c0b46f76902e07106af92184a
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 17:28:03 2011 +0800
Refine ARMRelocationFunctions.h.
From now on, we need only one modification in ARMRelocationFunctions.h
when implementating a new relocation function.
commit 310eefcec21d54ac779dd0fcf873a6f2ae72545a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 17:17:56 2011 +0800
Perform applyPLT0 and applyPLT1 in emitSectionData.
commit 9c4aa89aa53c1d348229c761fe2ac533fb188a9e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 17:11:31 2011 +0800
Add member m_EntryBytes into ARM/MipsDynRelSection
1. Add entry size as an parameter in constructor of
ARM/MipsDynRelSection
2. While reserveEntry, update the section size in LDSection
commit 11fbe3f506158cb8a71d73bd5b0d395c7d686cf3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 17:06:47 2011 +0800
ARMPLT::applyPLT0 applies a value to PLT0 Entry without parameters.
commit 12b04f8ccc3383f2b2325eaeae583e60dd186b96
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 16:57:54 2011 +0800
Fix bug: Use bitwise AND, not logical AND.
commit 00a411d4015fa2dc9488c5ebd6f8bea498b14731
Merge: a9ca660 3da5c7b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 16:20:15 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 3da5c7bdf32a1cdd99ce5e011ad3dfeb420c1ab5
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 16:16:14 2011 +0800
Implement emitSectionData for ARM GOT and PLT.
Currently I comment some code.
I will uncomment them once the size of MemoryRegion is not zero.
commit a9ca660a50cb6bc688b5f08a3bcf2a86a861c134
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 16:15:34 2011 +0800
Remove API - TargerLDBackend::getRelocEntrySize
Relocation entry size is both target and format dependent.
Let target handles the size itself.
commit 1da35041319730e81faef6ac2a9a060bf9a5ed64
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 15:53:19 2011 +0800
Add LDSection::setInfoLink() for conforming to GCC.
commit 7b473df9c46e9d998418f906361b9ea6791b0818
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 15:22:49 2011 +0800
Compute layout order of section in Backend.
Section order in layout is format-dependent and target-dependent.
commit dc6ca94e472933344c278f97b270e9f19cc0cb0f
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 15:16:47 2011 +0800
Add API - getRelocEntrySize() in TargetLDBackend
A format dependent API to get the size of
relocation entry.
commit d8f43156bbebc508e1805d3fa5ef1dabd014e83a
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 14:21:15 2011 +0800
Fix Bug - set pExist in getEntry()
commit cad284cb9ee0267fda05ebe7880bb6f94255d4c5
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 14:10:52 2011 +0800
Implement ELFWriter::getEntrySize().
commit b9ec46b43454ab7c9693113f723a0071b72e41fa
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 13:59:52 2011 +0800
Refine the function name.
Because we have too many getEntry() functions, so I change the
ELFWriter::getEntry() to ELFWrite::getnEntryPoint().
commit dc6b852ba058d21b7fe0d62559da8a250d078fca
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 13:49:27 2011 +0800
Add LDSection pointer into GOT, PLT and ARM/MipsDynRelSection
For target dependent ouput sections and relocation ouput
sections, target should maintain the size of the section
by itself.
While reserveEntry() is called, the size in LDSection has
to be updated, so that Layout will get the correct size
to decide the section offset.
Besides, target should maintain the offset of MCFragment
(GOT, PLT,...entries) by itself if the offset is needed to
apply relocation.
commit 1fe266a3b6f6344e94a3d36d459c3eef838dc45f
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 13:42:24 2011 +0800
Refine the code in Layout::getFragmentRef().
commit f329318e92f6519718f22e0672a54dad6c82835f
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 13:18:30 2011 +0800
Also make sure that fragment is ordered and valid in Layout::getFragmentRefOffset()
commit 102e3e1abe8cee149d23bcea2c02a1980fa5029e
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 13:17:25 2011 +0800
Short cut for debuging sections.
On-device linking should not support debug sections. But, in order to
speed up the development process, I handle debug sections as regular sections.
commit e167e013b8afa7d91361134f30a5d9af7c93b6a6
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 13:10:17 2011 +0800
Refine the code to set layout order.
commit 7896922ad4d92c18ddfaee1c4ea83ba6a15e32bd
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 11:45:08 2011 +0800
Fix a bug in Layout::getFragmentRef().
As computing the size of a range (section), need to add the size of last fragment.
commit 7708c0fc24bf143fe68319b8c7fd4ff7ba4e3a24
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 28 11:41:38 2011 +0800
Add code to order a range of fragments (set their LayoutOrder correctly.)
The patch for LLVM in commit, 040f5ca0cb95bf2329e1251e9bb28031d335dce7,
to initialize LayoutFragment in MCFragment is required.
commit 58e517a42a9d9b6a56c9f6064e9bbb8ad9300e8d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 10:58:03 2011 +0800
Unify API - getSectionData() in GOT and PLT
Both return reference of MCSectionData
commit 70c8782ef9d85aabdce5bca11b7e2eebb03d0022
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 28 10:50:41 2011 +0800
Modify API - getEntry() in ARMDynRelSection
Add input parameter "isForGOT" to identify if the relocation
entry is used to relocate GOT or normal sections.
commit 040f5ca0cb95bf2329e1251e9bb28031d335dce7
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 10:21:45 2011 +0800
Update patch/LLVM.patch. Initialize LayoutOrder in MCFragment.
commit 477d9de2b9f562ea9178e867d80268c302b28706
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 10:19:16 2011 +0800
Scaffolding of R_ARM_THM_CALL relocation function.
commit d315bc21208d5621d4d8efca2d708e521eb7c4ca
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 09:30:47 2011 +0800
Fix bugs of ARM thm_movw, thm_movt relocations.
commit 7fc904d41c54b98470d0dcaeaa7751d706a15fbf
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 10:14:31 2011 +0800
Add MCFillFragment when meeting a BSS.
commit 21f92079397642341b072ff8f90345332f48f8a7
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 09:59:58 2011 +0800
Move private member data in MCFragment to protected for inheritance.
commit 64e35a9817d664329a5deaaf715d9ab37352fd79
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 28 09:41:53 2011 +0800
Add new MCFragment type FT_Target for target-dependent MCFragments.
Remove FT_GOT and FT_PLT.
commit 744ed8b01a28643ff1da44aa14149ed42ab104ad
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Wed Dec 28 09:19:26 2011 +0800
pread() returns ssize_t (signed size type),
commit 4b0487ce96bfe0a73421bca2057ca4cee2aab00d
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 05:03:26 2011 +0800
Refine R_ARM_THM_MOV* relocation functions.
commit 2bb6c4f20e7b9bc6d4c21f3d183cbee9b2398f98
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 04:35:13 2011 +0800
Extract common helper function for ARM movw, movt relocation.
commit 383363bb1d288bd6b862e09058128d35427d99b2
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 04:22:43 2011 +0800
Refine R_ARM_MOVW_ABS_NC and R_ARM_MOVW_PREL_NC relocation functions.
commit 3f51c2d057d3d5d7c14dd46ca864d5105d2ebecf
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 03:42:38 2011 +0800
Fix bugs - ELFObjectReader should put all LDSections into the input's LDContext.
commit 603b0387a42db848b7ebb6e3220fd18fea9c8421
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 03:41:40 2011 +0800
Fix a bug - ELFReader::getLDSectionKind() should follow this table:
Regular AW SHT_PREINIT_ARRAY .preinit_array,
Regular AW SHT_INIT_ARRAY .init_array,
Regular AW SHT_FINI_ARRAY .fini_array,
Regular AW PROGBITS .ctors,.dtors, .data,
Regular AX PROGBITS .text
Regular A PROGBITS .rodata
Null 0 NULL ""
BSS AW NOBITS .bss
Note A PROGBITS .interp
Note AW DYNAMIC .dynamic
MetaData 0 PROGBITS .comment
NamePool A DYNSYM .dynsym,
NamePool A STRTAB .dynstr,
NamePool A HASH .hash
NamePool 0 SYMTAB .symtab,
NamePool 0 STRTAB .strtab
Relocation A REL/RELA .rela.dyn, .rela.plt, .rel.dyn, .rel.plt
commit ad55c14f39a890182e5702b508e59817dd1fcb0e
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 03:38:50 2011 +0800
add MCLinker::getOrCreateOutputSectHdr()
In some cases, it becomes convenient if MCLinker can get or create the output
section and return it directly.
commit 3e9875d283ab7366a0e5273338e60fd6d6205ee0
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Dec 28 03:23:58 2011 +0800
Code cleanup.
commit 194eff80a5bd3f109548f1092904fba335dc39ea
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 02:27:55 2011 +0800
Implement R_ARM_MOVT* and R_ARM_THM_MOVT* relocation functions.
commit 680035f66033ab667c66102207250e89f7ce64df
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 01:56:47 2011 +0800
Let writers can emit correct section header and tables.
commit 54541820a23ecebb3be2d73f00ddd62c9e03dbc2
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 01:55:26 2011 +0800
Add LDSection::setKind(). Writers want to esure LDSection::kind() is also correct.
commit 45433c157107cc762516c6045ae7afe1f96bc8da
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 01:54:37 2011 +0800
increase the default number of the program header entries.
commit 21817979918904927121a4e86ce3080207bf60d0
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 01:49:44 2011 +0800
Decrease the warning level. When a weak symbol is marked by a dynamic defined symbol, it won't issue warning.
commit 91331253ad64c0adc2eb2a5712b82fa72facb017
Author: luba <lubatang@gmail.com>
Date: Wed Dec 28 01:48:58 2011 +0800
Add a new function LDContext::getSectionIdx - get the section's index by name
commit e3735a39ad183bff6cbcaee31bc0f0f587d27cf8
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 01:50:08 2011 +0800
Add ARM TLS relocation function which LLVM may generate.
Though, we don't support it,
we still have to show error, rather than keep silent.
commit 095825be0c84e71a142668ec8d802a8ebd01018f
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 01:34:21 2011 +0800
Coding style: 80-columns.
commit 9445f38aa166c6bfbf88b878ec635d69318a1472
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 01:07:54 2011 +0800
Implement R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVW_PREL_NC relocation type.
Besides, merge MOVW unchecked (_NC) relocations into one
function, since their behaviors are almost same.
commit 406eda48bf763dccdfe91bdac62af78083b810f2
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 00:55:43 2011 +0800
Implement R_ARM_MOVW_PREL_NC relocation type.
commit fa8c9091bd937bd8e66721d076981d9994cae743
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 28 00:34:47 2011 +0800
Implement R_ARM_MOVW_ABS_NC relocation type.
commit 59768ad2fc0980bc532e65e5b034a67620df12fd
Author: Duo <pinronglu@gmail.com>
Date: Tue Dec 27 23:19:02 2011 +0800
Remove unnecessary functions of GNUArchiveReader.
Refine the code & Remove unnecessary functions.
commit 5b6640ea2a376f99b26c876b8d30d2bfb8714505
Merge: cde246a 868694a
Author: Duo <pinronglu@gmail.com>
Date: Tue Dec 27 23:15:59 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 868694a9bda6f56c15ae0e8791117d86fc1fec78
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 27 23:11:53 2011 +0800
Revert "Implement R_ARM_PC24 relocation type."
This reverts commit c87a5f2e7f04d0a055be56c32f8e492913197a06.
Sorry that I misunderstood the spec.
commit 5bdec948675c82e62d12c03ae7d48767c1e1ae39
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 22:19:33 2011 +0800
Not compute the size of Reloc, GOT, and PLT fragment.
Let Backend handle this. Layout and Writer only need to know llvm Fragments,
RegionFragment, and total size of Reloc, GOT, and PLT from LDSection.
commit c87a5f2e7f04d0a055be56c32f8e492913197a06
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 27 21:30:09 2011 +0800
Implement R_ARM_PC24 relocation type.
commit cde246a667964c47ee943d8adcd5be5f43720c0e
Merge: cc0fbc5 bd84a4d
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Tue Dec 27 18:49:11 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 14d7bf7c90c6aeb2d86fbcae7a6982fdb501fb21
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 20:55:54 2011 +0800
Add R_ARM_CALL and some PLT helper functions.
commit 73295df697a0ef738c828c99fb07edd40198aa7a
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 20:54:39 2011 +0800
Add sign extend helper function.
commit b112fdac7aeddfd1d845ca3949fe685b4b880d93
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 19:42:27 2011 +0800
Implement Layout::getFragmentRef() and Layout::getFragmentRefOffset()
commit a027e466cbe5faf59721b306b0dc0379058466eb
Merge: cc0fbc5 bd84a4d
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Tue Dec 27 18:49:11 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit cc0fbc5a0eb54e1d3c6ed579054a7a099ad0c92f
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Tue Dec 27 18:46:57 2011 +0800
std::stringstream needs <sstream>
commit bd84a4dadf172e81ce7da79c0a8651d6d4416a49
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 18:46:27 2011 +0800
Compute the size of MCRegionFragment.
commit aeee708ab045c5c578d94a571c3b62278e1ec3a0
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 17:53:59 2011 +0800
Merge fix for relocation API issue.
commit 386243f21a3e2ac83ad28c07c3e1080bfc59afdf
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 17:05:15 2011 +0800
Rewrite R_ARM_GOT_BREL.
Apply relocation must focus on apply the "pReloc" relocation. Initialize
GOT, PLT, and dynamic relocation can done by helper functions. Because
those operation basically is Relocation type independent.
commit 79c8ca3952615702a038b9bc7cc8224cdbd1a755
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 15:55:40 2011 +0800
Fix helper_GOT(section offset+fragment offsest).
commit 94cb09aa2bc372660e2c238e36fc9824ed2c9bb6
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 15:44:36 2011 +0800
Remove rel apply function's pParent constent.
commit d18676dbdb3a398001fba2ed5bf7fd65d93e1e66
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Dec 27 15:34:35 2011 +0800
Fix typo.
commit 86846f7389eec716042f7caf827e263c06bfd193
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Dec 26 22:42:30 2011 +0800
Implement ARM relocation: R_ARM_GOT_BREL.
commit 8fd4a499866676b85f801205fa5f8a9957e07460
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Dec 26 22:34:48 2011 +0800
Add ARM relocation helper functions.
commit c0f3c5a687adcec37cff147f28b7cd7832a16f20
Author: TDYa127 <a127a127@gmail.com>
Date: Mon Dec 26 03:44:18 2011 +0800
First priority arm relocations.
commit be5a709c5918ee07a76ad847f028b84a9cb8ce05
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 17:43:52 2011 +0800
Fix a bug - Writer should use LDSection::kind(), not LDSection::type(), to determine if the section needs special handling.
commit 9ee0f2379307072fb2dcdfa9d42a297d9ddb64a8
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 17:34:57 2011 +0800
Implement readers -
1. ELFDynObjReader::isMyFormat() and endian()
2. ELFObjectReader::isMyFormat() and endian().
commit d9834d67410416b522cbaacc226978e99bb84751
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 17:33:50 2011 +0800
Fix a bug - ELFReader::fileType() reads the opposite endian.
commit 0864b0c13f96891c2b4dbc0333c77a4d8adbf18c
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 16:58:19 2011 +0800
Implement some functions in ELFReader.
commit e3c302fe3c0e0e82af035641fad3f8ad6a87c74e
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 12:47:53 2011 +0400
Turn on MIPS LDInfo attributes and constraints.
commit ce007f50cb4bdd4bfb91494cecd96b9c1eac1b82
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 27 15:49:07 2011 +0800
Enhance applyPLT1().
applyPLT1() now is able to apply correct values without parameters.
commit eeb44651bedcd420c455c5d889d2de9c1225d76f
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 15:33:16 2011 +0800
Separate ELFReader::createELFObject() into createELF32Object() and createELF64Object().
commit 26160f290eb376486323368c149a18a85b572222
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Dec 27 15:07:16 2011 +0800
Unify API getEntry()
Let GOT has the same input parameter type with
PLT and ARMDynRelSection.
commit 50dc0f97dd8298d06bbeab193f3accee63cf2f6a
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 14:29:13 2011 +0800
Fix a bug - getLDSectionKind() can not return LDFileFormat::Debug.
In ELF, debug section is ruled by prefix 'debug', not type.
commit 788fe3a6b7a58f267a055f5dde09c90e1c27e6bf
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Dec 27 13:09:02 2011 +0800
Fix bug : assert when m_pTargetData is NULL
commit 1ed052e43da5b90a10c9e85a56c759c726f7206d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Dec 27 13:05:00 2011 +0800
Add setSymInfo() in Relocation
commit c438c453c3d370a5d847ce30f5a08af7c8f759d0
Author: luba <lubatang@gmail.com>
Date: Tue Dec 27 11:50:39 2011 +0800
Fix a bug - MCFragmentRef should have forward declaration of class Layout.
commit d0b1762356e1e1ef3d91b2172a1b0d360be75b71
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 10:24:02 2011 +0800
Add implementation of layout functions to lay out a fragment.
commit dd59a29fcb34ce87d072f1c93dec6fa65de83fe8
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 09:54:01 2011 +0800
Follow llvm::MCAsmLayout to add some layout functions in Layout.
commit edda9ee39c4344fb5c3754434119ad45a9fe3f43
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 27 09:44:08 2011 +0800
Add mcld::computeFragmentSize for Layout or Writer to compute fragment size.
commit d8bb922d9bfd2cd49210cac36da979b6e6b5f7e6
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 02:35:26 2011 +0400
Replace EF_MIPS_ARCH_32 by EF_MIPS_ARCH_32R2.
commit 2291b81f31b63b8b348bf4a72b98e241d87cd3c6
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 02:04:40 2011 +0400
Add placeholders to .MIPS.stubs and .plt entries reservations.
commit 4997cca774f01db26f8409e3f97a310186f24946
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 01:52:37 2011 +0400
Implement aux functions to create MIPS specific sections.
commit 478439a1992166ddc1874ceaf23dbbe02e27b99e
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 01:25:53 2011 +0400
Implement entry reservation for MIPS .rel.dyn section.
commit 0b960b4748adc67a2571af69ed6bffbc11ebd369
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 27 00:01:28 2011 +0400
Move GOT section creation to the separate MipsGNULDBackend::createGOTSec() method.
commit 8fd36ac29d938580302a5332ef40bfce3f19d10c
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Dec 26 23:38:42 2011 +0400
Initial implementation of MipsGNULDBackend::scanRelocation().
commit bc294aa93d072bba5eccbb1ec9c9c42b8f194bbc
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Dec 26 23:27:29 2011 +0400
Use std::auto_ptr to ensure that an object will be deleted.
commit e2a263e42a309ed7022826406b93ff4f2c067f32
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:27:18 2011 +0800
implement MCLinker::emitOutput()
commit edc84403dec6d5f906ed502dc1fce16414c8e054
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:25:08 2011 +0800
Redefine LDFileFormat, and implement the basic shared object writer.
commit 8e4a41c38c083f242aa6e3b3c7fd7dbe860bdfe5
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:23:51 2011 +0800
Implement -e options.
commit 4f2d8cbc447bef3e2c1bf95e6b6bb29476a593ba
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:22:51 2011 +0800
Fix a bug - previous commits forget to add GNULDBackend
commit 23ede9002a41baa4f1c1b56d64540deb5f2b1ff2
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:21:15 2011 +0800
Add some fields for emission of the ELF header.
commit 2518990a1bad651c9c9c59bbfb55782301e89225
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:19:22 2011 +0800
MCLinker redirects StrSymPool to MCLDInfo
commit b5e2d70aab39eb148b85cb3e366cf988ab5bf7f5
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:18:29 2011 +0800
Enable -e options in MCLinker.
commit 29c1c4232a0dd9a4273c4f584f861806f1cc61f1
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:17:30 2011 +0800
Add LDSection::hasSectionData().
commit 2de4610459a3d0ce2c6b374cdc8412faa6044f9d
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:14:39 2011 +0800
Use only one LDContext::symtab()
dynsym() is redundant.
commit a3aa37557681f1efec7a96022a972813bf6e09f5
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:10:46 2011 +0800
Add StrSymPool::addSymbol and addInfo functions.
commit b5947fd364f2cdb9fda2e6b3a5df60b2efebba50
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:09:46 2011 +0800
Let StrSymPool can get from MCLDInfo.
commit f089c45eb8ec68a317b8bd8552309b9167af6c08
Author: luba <lubatang@gmail.com>
Date: Mon Dec 26 22:08:36 2011 +0800
Add some basic functions in Layout.
commit da248b3c9b7a278defce8c6a92d89e8ebaec8988
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 21:10:00 2011 +0800
Enhance GOTIterator.
commit c34cac884e406a7946242519d1b95f072c504320
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 20:08:33 2011 +0800
Add a member function getPLT0().
commit 260391b4f21d4ae11787b55321dcff064dbd2d44
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 19:55:09 2011 +0800
Implement GOTIterator.
GOTIterator is used to traverse all kinds of got entries.
commit f50ea946c3740b18be4fd2d0451eaa2164361cb3
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 26 17:54:17 2011 +0800
Let Relocation be a kind of MCFragment with type FT_Reloc
commit 314174d230658fdd6dfb62436712f5aba4711963
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 26 17:10:57 2011 +0800
Change the type of Offset in MCFragmentRef to uint64_t.
commit 9d346b4d9295b9e369a7530fad86fa972459307e
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 26 17:04:41 2011 +0800
Implement addInputRange in Layout.
commit 354a447881b4edf663b859518f15c4ed56c0ee58
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 26 15:52:46 2011 +0800
Refine the structure for input range in Layout.
commit b270dd5d0b06e141ee43fda04c6b4341bbd38690
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 16:27:45 2011 +0800
Add new MCFragment type FT_Reloc for relocation.
commit 70b7183942d92b6fb93caa6bb4675fe922c07704
Author: Jason Lin <sh.lin@mediatek.com>
Date: Mon Dec 26 15:52:30 2011 +0800
Clean up logs
commit aef214663d6584db5b08d6e9bbe9409c34668132
Author: Jason Lin <sh.lin@mediatek.com>
Date: Mon Dec 26 15:18:39 2011 +0800
Add program header write out function.
Program header table sometimes has target-dependent seqment entries
for different architectures, currently we use swithes to generate
these special segments for now.
commit a9c0210bcdc2ba66b3715261e6f71f15ad100137
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 15:34:08 2011 +0800
Fix coding style, no functionality change.
commit 056e1aa7f9a303155d3a762e72f3d9a9821ffeb6
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 26 15:32:05 2011 +0800
Add const version of getSectionData in LDSection.
commit 670f6d30cb243a18b5ac5202df94e692fc4340d9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 15:30:22 2011 +0800
Update patch/LLVM.patch.
Add missing namespace mcld to class Layout.
commit a6cc3d29bf567a42b911ce3759678ab410cd1da2
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 14:45:29 2011 +0800
Update patch/LLVM.patch.
Make Layout be friend class of MCFragment and MCSectionData.
commit 2c6c30e32504e6fc5d98cd134db51d44aac760ee
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 26 13:44:30 2011 +0800
Add the Implementation of ARMGOT::getEntry, applyGOT0, applyGOTPLT.
commit 4286be84bfadb83c974d71b87327eca6dcfa127b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 26 13:04:28 2011 +0800
Implement getPLT(), getRelDyn() and getRelPLT() in ARMLDBackend
commit 295873c9fa6d81adfb438a501f3cd9711dda705d
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 26 11:32:02 2011 +0800
Add error message in ScanRelocation
commit b4a76b03b70389c37c98f6bc168fdeaee1f89088
Author: luba <lubatang@gmail.com>
Date: Sun Dec 25 00:43:07 2011 +0800
Because MCLinker::createSectHdr() and getOrCreateSectionData() always return a valid result, I change their type from pointer to reference.
commit e9be486a629c21e6e3861b21cea901ecf5cbabf4
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:23:49 2011 +0800
Fix a bug - every section header should be added in its LDContext::SectionTable.
commit fa72975274447ca83c1553d078de9d5fc2aee0b2
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:23:07 2011 +0800
ELFReader::getSectionType should return LDFileFormat::Debug type.
commit 889108d49275551a377e3d531fc1fddc587e3517
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:21:43 2011 +0800
remove obsolete getOrCreateSection() in LDContext
commit c64785986f3feffd1aa0995d8292040e67bdf054
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:21:00 2011 +0800
Fix a bug - every pointer should be initialized as zero.
commit 7fb5bd6ccfc84a4088156286d5575bdf020b065e
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:05:37 2011 +0800
Add a new kind - LDFileFormat::Debug
commit fadc31f96b1421789f834cb5a2ce88b0fba3e4f0
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 23:00:18 2011 +0800
Refine the warning message when read a symbol with unsupported type.
commit b495dc73016cb3648e81ea9f8d37dd8c99fe47f7
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:48:25 2011 +0800
Fix a bug - add dynamic symbols should enable the `pIsDyn' paramter.
commit 44313e81484300ed0c0a84aa928180a04d196870
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:47:53 2011 +0800
Fix a bug - dynamic ABS symbol should be handled as dynamic defined symbol.
commit 4a140c1a885ecc12007cfc5acdcf3e9b6a8bd9b4
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:31:46 2011 +0800
Fig a bug - should let LDSymbol::FragmentRef in ELF shared object empty.
sh_shndx of symbols in dynamic shared objects will eventually be set to SHN_UNDEF.
Therefore, readers do not need to read it.
commit a882ff25989cd64be364b29cfdf70d38c139c556
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:28:38 2011 +0800
Let the error message of invalid section clearier.
commit 4db79fc61732f32e673818b78bad346699b64657
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:20:02 2011 +0800
Because we have no RTTI and exception, we should handle the out_of_range by ourselves.
commit 602829648da18410c98e59448b35df863c9af819
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:18:51 2011 +0800
Refine the symbol-adding functions.
1. Add ABS symbol
2. set symbol's fragment reference
3. resolve some conflicting definition between rslinkers and llvm/Support/ELF.h
commit 9f3ccf91ad92cfd5ac04cb18e3076248f183da3b
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:17:34 2011 +0800
Add LDSymbol::setFragmentRef(const FragmentRef& pRef) for conventient.
commit f9f1d91a209686c994aab1aefff009b9339ae56f
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:16:01 2011 +0800
fix bug - MCLinker and StrSymPool should provide ResolveInfo::Type as one of the parameters in the adding-symbol functions
commit 841248330380b9c2b1a392e082ef0784a1b83fc9
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:14:37 2011 +0800
open Layout::getFragmentRef API.
commit 6360a725302d5ec2a496bfbe7855597eec130d74
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:11:57 2011 +0800
Because in current LLVM, some variables, such as STB_LOOS, etc., are defined,
I remove them from rslinker/ELF.h.
In order to avoid `expected unqualified-id before numeric constant', I define
these variables by enum, rather than \#define.
commit eb56740fc14caa95f3ee17a4f7b9d9a19922de5a
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:03:08 2011 +0800
Fix a but - ResolveInfo::overrideAttribute() should override low_16 bits of bitfield.
commit b9a3414dbf1a33fff097f615245347475486c16c
Author: luba <lubatang@gmail.com>
Date: Sat Dec 24 22:01:25 2011 +0800
add MCFragmenrRef::assign(const MCFragmentRef& pCopy) for convenient.
commit a96ea168307fb1551bb0cda8319d668ff325b72b
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 23 21:49:15 2011 +0800
Create .plt, .got, .rel.plt, .rel.dyn Section and SectionData
commit 1f870f1a4516370021ca1aafe4d8cafc3bffac07
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 23 21:22:47 2011 +0800
Implement ScanRelocation in ARMLDBackend
commit bfadd67b5dd4adf7c627c5c4ffc7cbda8b8f835c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 23 21:20:14 2011 +0800
Create ARMDynRelSection
The dynamic relocation table for .rel.plt and .rel.dyn sectoin
commit 334cd9bbf3580d5496aeafeff633093991c32f02
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 23 21:00:55 2011 +0800
Add addMapping() in SectionMerger.
When we need to create a section header for output LDContext, we should add a
mapping in the mapping table of SectionMerger.
commit 704c3720fc2d25da8a1fa70eaa82ffa898e25dbf
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 20:16:40 2011 +0800
Remove TODO and fix a bug in ARM::getEntry().
commit db8508c939ea1bf4073fcf7d1c665200d7594701
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 23 20:08:37 2011 +0800
Add find() in SectionMerger.
commit e7f12246d4b47749b7a2157b8929c8166e367747
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Fri Dec 23 19:55:28 2011 +0800
malloc() should in stdlib.h, and many BSD systems don't have <malloc.h> now,
commit b6d299d0eab71ab6e44fe820ae8b21409bc5d283
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 17:59:22 2011 +0800
Enhance ARMPLT::reserveEntry().
commit a0df9590e866888238f16f96368992c78f35ef6e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 17:34:08 2011 +0800
Implement several ARMPLT methods.
They are applyPLT0, applyPLT1,and getEntry.
commit 67c632f5ef29f7265eef50a6a80c067af7c241c7
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 16:27:25 2011 +0800
Fix a bug -
Typo, I should use CommonBlock rather Common for the Type.
commit 8598343dee8f6bcba51cf1fbf105082123620edc
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 16:12:22 2011 +0800
Add ResolveInfo::Common for common block.
commit c8ec48b211ae5411c7a56116a279caff3dbd883d
Author: ras46 <Robert.Lai@mediatek.com>
Date: Fri Dec 23 10:34:17 2011 +0800
Write out section data by iterate the section header.
Assume layout is done correctly, now we can start to write section data.
Use LDContext::const_sect_iterator to iterate all LDSection and get
its MCSectionData. Currently, we have not really write section data
to the output file.
commit 3be6b667c849092fa342a6f297a10d9864db81f2
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 15:52:08 2011 +0800
Open MCLinker API to add relocations.
commit 075fbe5c4cf1dcb0d00cfd1bce647590de751521
Author: Jason Lin <sh.lin@mediatek.com>
Date: Fri Dec 23 15:02:28 2011 +0800
Add alignment information in section header table.
commit 8f6382e415272fa13277f1051056545bfd7cadcf
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Fri Dec 23 14:02:13 2011 +0800
Support read sections from ELF-Object.
commit b6f208cfc7d7bfb74e7e020f25edca4704fd1e89
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Thu Dec 22 20:12:59 2011 +0800
Support ELF-Relocation in ELF-Object.
commit e813f3423d33f4659352a970a67e2fbb466e3ba8
Author: Jason Lin <sh.lin@mediatek.com>
Date: Fri Dec 23 14:36:44 2011 +0800
Refine ELF header write out function.
commit 4ed0c1dd2ae53fde8ea0739bd2edef08a71fcac9
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 14:21:35 2011 +0800
Fix bug -
StaticResolver will jump out of the table.
commit 47c946561772f56a91f6b2d0f2462cec26e18054
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 14:12:34 2011 +0800
Add Resolver::Result to member the result of symbol resolution.
commit dff7a00f6c4d9f7bf175ea708f9e8718bc29083f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 13:36:25 2011 +0800
Make PLT own an MCSectionData pointer as GOT rather than inheriting it.
commit 41d11b46b66ccd21c5aa16e728cb92b43ebd664f
Author: luba <lubatang@gmail.com>
Date: Fri Dec 23 11:44:03 2011 +0800
report an internal error when StaticResolver fails.
commit 1d7b2f4aece1ab876f9b9addda822b52f771cd4d
Author: ras46 <Robert.Lai@mediatek.com>
Date: Fri Dec 23 11:05:36 2011 +0800
Fix typo.
commit 81eefc392b18ac213d9b6e13c2de095025012bda
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 10:47:32 2011 +0800
Make GOT own an MCSectionData pointer rather than inheriting it.
commit b75c07654bfa79acb34d9e8d74ad56a8ca2b9d02
Author: ras46 <Robert.Lai@mediatek.com>
Date: Fri Dec 23 09:28:57 2011 +0800
[Style] Remove 'using namespace std' and #include <iostream>
commit 94b0a18372c1f4f32bcad850959929a4b5e2fe26
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 23 09:39:01 2011 +0800
Move initPLTEntry to private.
commit 7948f2fbcd77d6ad49903c4ae25d857b377904a5
Author: Chinyen Chou <petechou@gmail.com>
Date: Fri Dec 23 09:16:38 2011 +0800
Refine the code.
commit ff21d7cce6ca4401298dba08e141b8ddd12362f3
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 21:43:06 2011 +0800
Initialize the pointer to MCSectionData in LDSection as NULL.
commit 563614a22083cb5590a195bb9e1942af773be972
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 21:24:21 2011 +0800
Implement getOrCreateSectData in MCLinker.
Any who request a MCSectionData from MCLinker should base on a LDSection first.
And SectionMerger in MCLinker will try to find a suitable MCSectionData in return.
(see commit, 162fb771a9d9e351a45aeeba2a7c7433863694b5)
And the pointer to MCSectionData in input LDsection and/or in output LDSection
will be set properly also.
commit dcf956efa48e2c4581bf4f3c9ef848f36259eba0
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 21:20:22 2011 +0800
Add SectionMerger in MCLinker.
commit 162fb771a9d9e351a45aeeba2a7c7433863694b5
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 20:49:54 2011 +0800
Refine SectionMerger to fit current design.
SectionMerger would use
1. SectionMap, a "Name-to-Name" map from input substring to output section
2. LDContext of output, who has the output LDSection list
to build up another map from input substring to output LDSection.
And then from the output LDSection itself, an associated output MCSectionData
can be gotten. Furthermore, section mergeing is done in this way.
For example, reader requests one MCSectionData for .text.foo, and another one
for .text.bar, and SectionMerger returns the MCSectionData of .text in output
directly.
commit bdb417e301a5f7376b09b8502dc648aa3c3e1b9a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 22 21:28:50 2011 +0800
A quick patch.
Avoid passing instances of derived classes of MCSectionData
to MCFragment constructor, this results in segmentation fault.
commit 80dd5b73b833cbca0118d3d2bca79268590133ff
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 22 21:14:57 2011 +0800
Modify API - TargetLDBackend::scanRelocation
Add parameters pLinker and pType
pLinker - we need MCLinker to create LDSection and MCSectionData
pType - the output format type
commit bba7f054c9e0d065796fba853ae04a8459f5b93a
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 22 20:37:55 2011 +0800
Update .dynsym and .dynstr section header.
Write the correct sh_offset and sh_addr.
commit 3605d5accef1ed0067d351fe97283478da0d76e5
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 22 20:39:48 2011 +0800
Add API - produceEmptyEntry() in RelocationFactory
When ScanRelocation, we need to create empty entry for
dynamic relocatoin (ouput relocation).
These empty entris occupied memory space but all their
contents are set to zero.
commit af4db020d4e4e54b445052c293b2b43b45f197a4
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Dec 22 18:10:16 2011 +0800
Fix some typo and comments.
commit a94967b9a9989f8dc44c64844d7719c214525192
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Dec 22 17:31:49 2011 +0800
Fix section header table sh_name index assignment issue.
commit c82184bbb81bb03caf5ade27d508ae2509edd1e6
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 14:52:40 2011 +0800
Let bitcode is a kind of position-dependent option
The embedded libraries also be treated as a kind of namespec.
commit 466b0cdc4a3b225e25c47c6ed3664cadea4fccf7
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 22 14:41:07 2011 +0800
Implement ARM GOT.
There are three kinds of got entries in .got section,
they are reserved got entries, got.plt entries, general got entries.
The top of .got section is reserved got entries,
and got.plt entries immediately follow behind reserved got entries,
the last are general got entries.
We store got entries in three separate ARMGOTEnties instances, which inherits MCFragment,
to avoid sort or rearrangement when writing out by the order.
commit 59b6ca8c30e79e4ab266fc9d24e66b37cd6a6f08
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 22 14:35:27 2011 +0800
Add sectionStartOffset() to get section's start offset in the output file.
commit 3fb6408e6459c4350f177a6af4a450ff2198a694
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 13:17:34 2011 +0800
Change the type of first parameter `pInputFilename' from const std::string& to const llvm::cl::opt<std::string>&
Because the input bitcode should be position-dependent, we let the input bitcode keep its position.
commit a2f95fdceef97f926d2ba0800895dfb15df8ceaf
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 13:14:30 2011 +0800
Add ARM dependent section mappings in ARM backend.
commit f80e8451062a6d5abc181c06f39ac015247fd87e
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 11:48:38 2011 +0800
Initialize standard section map in MCLinker.
commit f9563793a42417edccdbfbfb98e1483d07159a92
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 11:45:54 2011 +0800
Refine SectionMap.
commit ea7fa03a1ee865ea96e5a8055a8f1da196d7c34e
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 11:25:34 2011 +0800
Add initializing section map support in MCLDDriver.
1. MCLinker will add standard section mapping, e.g., elf
2. Target can also add target dependent mapping
commit b83f5af023bba393b8d32521c353bae3f048ee42
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 10:55:21 2011 +0800
Refine the warning message in SectionLinker
commit 72d9fe76ade287a3050525b066cb6556c99c1987
Author: Chinyen Chou <petechou@gmail.com>
Date: Thu Dec 22 10:39:24 2011 +0800
Refine mapping rule in SectionMap.
Add support for
1. wildcard (*) to a user defined output section
2. if still no matching, just let a output section has the same input name
commit 1afc0eed3dfdc2d83accf429675bba1889ff1043
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 10:43:02 2011 +0800
Refine the warning message of AndroidSectLinker
commit 2d485e6bd0d7e7d4e3fec3a820a3bd1fd765e025
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 10:40:15 2011 +0800
Decrease the level of warning -
If a directory can not open, should not report fatal error immediately.
We should open a !isGood() directory.
commit d5f4d60ae3ae23872b2dbb763e5db4f1c4f3918a
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Dec 22 09:30:12 2011 +0800
Remove function which generates testing information.
commit 75a0870fab5038e8fc48c7791c246de692c14a68
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 02:17:40 2011 +0800
MemoryArea should open before calling isMyFormat().
commit 023ec211429af0691f35a12cb8d7ead5efa5d73c
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 02:15:41 2011 +0800
Let AndroidSectLinker to go the normal path.
Previous AndroidSectLinker use its own doInitialize for rapid prototyping.
This patch changes it to the original normalization path.
commit 5487eb6731c23814b23dac000d3ac6945d1e60af
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 02:14:01 2011 +0800
Fix bugs -
MCLDDirectory::iterator should always begin from the cache.
commit 4a1065cec7608c3c5beff5e0b9b46b153920e6e6
Author: luba <lubatang@gmail.com>
Date: Thu Dec 22 02:10:15 2011 +0800
Fix a bug -
When HashIterator is end(), it should return immediately.
commit 7fefe1136c75dbb0ccc6c10aff3934f819c5a7a4
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 21 19:15:09 2011 +0400
Check for _gp_disp symbol name in the R_MIPS_LO16 relocation processing function.
commit a17c1f7d1a52f064978c189decc4f2ceb10628de
Author: Jason Lin <sh.lin@mediatek.com>
Date: Wed Dec 21 22:18:17 2011 +0800
Add section header table write out functions
commit ec1ee45956d01c70c2bc7d9a185ece6a72f38362
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 22:08:35 2011 +0800
The function, getOrCreateSectData, should depend on LDSection.
commit ebfe31b80d1342d33f1e9d1362d1a445eef0e7db
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 22:06:41 2011 +0800
Implement getSection in LDContext.
commit 9d809e93e8d24ff1577aebe90c648dcc9b90e4da
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 21:56:10 2011 +0800
Changes due to the change of corresponding api name.
This is based on previous commit, 37c5f6f9e8cf38375b60d2c587b56987d0952dd9
commit 37c5f6f9e8cf38375b60d2c587b56987d0952dd9
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 21:50:20 2011 +0800
Change getOrCreateSectHdr to createSectHdr in MCLinker.
Now reader also needs LDSection and all users of LDSection should get it from
corresponding LDContext. Thus Change the api name to prevent confusion.
commit 6776482e59b8a845fe607a5362905209a06150ac
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 21:36:34 2011 +0800
Add SectionMap in MCLDDriver.
commit d7409c8f8fbcc84c4ad1b85c9731e0760d0d045e
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 21:28:13 2011 +0800
Add getOutputSectName api in SectionMap.
This is for user to find out the associated output section name from the
given input section name.
commit c205ff091f4f44ca48762e9ede1b32acea5a031e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 21:24:15 2011 +0800
Create GOT, PLT, .rel.dyn and .rel.plt in ARMLDBackend.
commit 49ffca6e955889e3da28895962fe64acaf2d4f55
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 21:09:03 2011 +0800
Modify Relocation to inherit MCFragment
The Relocation becomes a kind of MCFragment.
and the relocation table will be a MCSectionData.
Modify applying function lol6 in MipsRelocationFactory
to resolve the pReloc.getPrevNode() return type.
commit a10467493cce08fc3c4f32f2784e6e061cfcacf3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 21 20:34:53 2011 +0800
Add a missing header file.
commit 4d39006bf5bcb671598f60cc8dff084aff0b6156
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 19:12:55 2011 +0800
Add pointer back to MCSectionData in LDSection.
commit 0d520ec83c443eb282b57c8df93e499a0603e42b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 21 19:06:46 2011 +0800
Add a missing header file.
commit 9d76dae305e578f5a5e70bcfe0149ce1e11792db
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 17:40:09 2011 +0800
Trigger read sections.
commit c0422e9a5498d7d205eedc5a3bbe243bf8cb2ba4
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 17:19:54 2011 +0800
Change ResolveInfo::value() setValue()
Because Relocation should use finalized symbol value, so we
move the finalized address pointed by the symbol from ResolveInfo::value
to LDSymbol::outSymbol().
commit 3b02f5cee5027922e5230b142ac04e9094da17b3
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 16:44:12 2011 +0800
Add value in LDSymbol.
commit 29ed64610896512023a5a74039d70a1cf84242c3
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 15:05:33 2011 +0800
open finalizeSymbolValue API.
commit d88adc28c78f94bf49ba4c4d55e5f63b4a3223b8
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 14:09:10 2011 +0800
Add API - TargetLDBackend::scanRelocation(Relocation&)
Determine the entries such as GOT and PLT are needed or
not for the input relocation. If needed, create the
empty entries.
After symbol resolution has been done, MCLinker traveses
relocations to generate empty entries. These empty entries
are genrtated for Layout to determine the ouput offset.
For ARM and X86, GOT, PLT and dynamic relocation entries
are created if needed.
For Mips, GOT, dynamic relocation, GP, or other target
dependent entrires are created here if needed.
commit 471f65e19434dab1adca03fcde8a9e8bb821db57
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 12:55:14 2011 +0800
Fix a bug -
ResolveInfo.info() is out of the range.
commit 8d236455633bf70a05ef8ca307bf5f2ea481f002
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 11:45:38 2011 +0800
Add virtual function reserveEntry() and getEntry() to GOT.
void reserveEntry(int pNum) -
Before layout, we scan all relocations to determine if GOT entries are
needed. If an entry is needed, an empty entry is reserved by calling
reserveEntry(), so that Layout has ability to adjust the GOT fragment offset.
GOTEntry* getEntry(const ResolveInfo& pSymbol, bool& pExist) -
After layout is determined, we fill up the GOT entries when applying relocations.
getEntry() return the entry we need:
- An empty entry or
- the filled entry with pSymbol if we've filled a entry for pSymbol before.
commit d01d57067f588de5483f8d24d2a0ae6c1c78a99b
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 11:32:36 2011 +0800
Create API - MCLDDriver::createDynSymTable().
Because the hash table and dynamic symbol table are format-dependent,
I want to move related functions to TargetLDBackend.
Just like GOT, PLT, dynamic symbol table and hash table should be
backend special data structures.
commit eb276864b2cbce9bed1c235b7ffa84099f640e8f
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Wed Dec 21 11:15:55 2011 +0800
Change field filesize from MCLDFile to MemoryArea.
commit 97371c456b285af22905e1e7bae331d2458bea25
Author: Chinyen Chou <petechou@gmail.com>
Date: Wed Dec 21 10:36:43 2011 +0800
Rewrite SectionMap.
Now SectionMap contains the mapping from input substr to output str and offset
for future LD Script support.
commit 47a13edccd75c4930e09555307c12244e142d234
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 10:15:02 2011 +0800
Modify PLT interface
1. add reserveEntry() and getEntry()
2. remove virtual funtion getOrCreateGOTPLT()
3. remove parameter GOT section in constructor
4. Refine ARMPLT
commit 5c01b73d614a2a8d70194374a4654f37beac63f8
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 09:57:01 2011 +0800
remove the 2nd parameter `TargetLDBackend' from RelocationFactory constructor.
All target backends have their own special data structures. For example,
ARM has .got, .plt, X86 has .got.plt, .got and .plt, Mips has .gp, .got.
Those special data structures should not dependent on the abstract TargetLDBackend
interface. We want that target backends themselves handle the special data
structure.
We want:
ARMGNUTargetBackend has functions getGOT(), getPLT()
X86GNUTargetBackend has functions getGOT, getPLT(), getGOTPLT()
MipsGNUTargetBackend has function getGOT(), getGP(), and so on.
TargetLDBackend or any abstract backend interface should not provide abovementioned
functions, instead, the concrete backend should provide.
In previous architecture, Luba made a mistake to put the abstract TargetLDBackend
as one of parameters in the RelocationFactory constructor. This wrong design forcely
put all target special data structure in the abstract TargetLDBackend.
So, we add getTarget() virtual function in the abstract RelocationFactory,
and ask all target backends should implement this virtual function by co-variant
return type. For example, ARMRelocationFactory::getTarget() should return
ARMGNULDBackend& if the relocation factory is created by the ARMGNULDBackend.
By the new design, all concrete targets can implement their own target special data
structure.
commit d0df17e88eae111b9675126d78589f7d83ae5eb5
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 21 08:52:54 2011 +0800
Fix build fail
Remove calling hasPLT() in StaticResolverTest
commit 4eafdad8dab88aa02788d40ee0aabe28bdaee522
Author: luba <lubatang@gmail.com>
Date: Wed Dec 21 02:23:57 2011 +0800
Remove hasPLT field and add Reserved field in ResolveInfo.
commit f19050d69265cdc726fadddf6ac66c3deada7c22
Author: ras46 <Robert.Lai@mediatek.com>
Date: Tue Dec 20 22:31:36 2011 +0800
Convert value between ResolveInfo::Binding and ELF::Binding.
commit c25457c8b8dc6fe9f2d304c722b92c25d245dc73
Author: Jason Lin <sh.lin@mediatek.com>
Date: Tue Dec 20 22:01:02 2011 +0800
Revert the change on LDSection.
commit d658c94c07c615db760ebc0c5f3ee458b9af6269
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Tue Dec 20 16:52:02 2011 +0800
Support Reading Symbols from ELF-Object.
commit e00f8d3a724850132be9bda9ac6da48cd0c8a964
Author: Jason Lin <sh.lin@mediatek.com>
Date: Tue Dec 20 20:59:49 2011 +0800
Add sh_link and sh_info member into LDSection.
commit 2b5edd6068532c9f8588d565a54fd0289101b508
Author: ras46 <Robert.Lai@mediatek.com>
Date: Tue Dec 20 19:26:28 2011 +0800
Set correct file size in MemoryArea.
commit c0bb3a7cc615b28c71bd9aef0096736b22d936cf
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 17:38:14 2011 +0800
Add a switch case for mcld::CGFT_OBJFile.
commit a5faec9fb63a81b077c53211f1965b3f810c84f0
Author: ras46 <Robert.Lai@mediatek.com>
Date: Tue Dec 20 15:37:04 2011 +0800
Write out .dynsym and .dynstr section data.
commit 4b3b8ee4e42a7cf5be9a2d190ac48f45c20c0b06
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 17:08:32 2011 +0800
Fix typo.
commit cfce8a2a50a1c1fd589d7385fd15a9d1d5076ce3
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 16:35:16 2011 +0800
Add ARM target-dependent sections in ARMLDBackend.
add .ARM.exidx, .ARM.extab, and .ARM.attributes sections
commit 8928ce5f6d36641cbde4bcd234a2c650e6878791
Author: luba <lubatang@gmail.com>
Date: Tue Dec 20 16:38:49 2011 +0800
Fix bug in StrSymPool and MCLinker -
If the symbol is existent, MCLinker should not push the symbol into LDContext.
commit e840ac925a7873df198577514982cb28254cb5aa
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 16:18:23 2011 +0800
Silence warning.
commit c674a30bae7f58a00d2eca02c1d47200aa5c2c7c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 16:00:58 2011 +0800
Modify building system.
Now MCLinker can be built without "source ./scripts/envsetup.sh".
commit bfbc8dd667b0db11e16fe8e03ca2c9510d8dab98
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 15:50:02 2011 +0800
Add a missing header file.
commit 31109fbf57bdb79e5c8c03b523cf564103556f89
Author: ras46 <Robert.Lai@mediatek.com>
Date: Tue Dec 20 15:21:15 2011 +0800
Fix MemoryArea write issue.
if file_offset+length > current file-size, we need to expand the file-size to fit it.
Otherwise, it will cause bus error.
commit 44c8d4ed74ca74b937ef50f40b6f96fb929a1508
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 15:03:29 2011 +0800
Add getOrCreateSectData api in MCLinker for reader to map and perform section merging.
To prevent confusion, rename getOrCreateSection as getOrCreateSectHdr.
commit 36d36b889b30c4bbbabc30cb70147c4f47e73486
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 14:50:06 2011 +0800
Rename SectionFactory as LDSectionFactory, and implement getOrCreateSection.
commit a41acb52f445312bd151a6d022000618760e8e63
Author: luba <lubatang@gmail.com>
Date: Tue Dec 20 14:20:16 2011 +0800
Add new testcases for our common cases in AndroidSectLinker
commit e7c6ef256623a6d67ad4a599ee0926b91526a1de
Author: luba <lubatang@gmail.com>
Date: Tue Dec 20 13:41:14 2011 +0800
The function of ResolveInfo::setSource return the opposite value.
commit 93ffd84ed3f19a31a9c2d5bf04034c103f49817e
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 10:36:35 2011 +0800
Use unified getOrCreateSection api instead of knowing SectionFactory.
commit 9d195a1e34d4688c581d4803f4278e8ad9b573d8
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 10:17:27 2011 +0800
Clean up the code in MCLDDriver and LDBackend related files.
Remove LDContext since SectionFactor is moved to MCLinker instead.
commit e142d0e6f51618527fa3c0ce80ee47990e130dc0
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 10:16:00 2011 +0800
Clean up the code in FileFormat related files.
Remove LDContext since SectionFactory is moved to MCLinker.
commit c0608413669ea3d8bd812b0e04b9abb543e348b2
Author: Chinyen Chou <petechou@gmail.com>
Date: Tue Dec 20 10:06:06 2011 +0800
Move SectionFactory from LDContext to MCLinker.
We decided to do so due to centralized design in 1st prototype of MCLinker.
commit c77d5161023a74c16e30cd3431cce9965dfd703a
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Tue Dec 20 10:38:02 2011 +0800
Support Reading Symbols from ELF-DSO.
commit fa6d740cb8d484b2fc94f16e05b95f4ab0a82722
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 10:26:49 2011 +0800
Add missing DSO and EXE switch case.
commit f9ae5ad6ae862ef5caf155f976f82bce1b0d808f
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 20 03:02:13 2011 +0800
Fix README.
Use LLVM 3.1svn r146714.
commit 996126a67872ec293371ebb6ff0afcb265fd3a2a
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 20 10:04:07 2011 +0800
Add a new getOrCreateGOTPLT method.
commit 49f97b746b703313bd466ac84de2e91c51b38c80
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Mon Dec 19 21:33:51 2011 +0800
Support ELF Reading feature (Simplify from linkloader).
commit b070963fc72b21e725f1ad43f1561a41bbfe32e4
Author: Jason Lin <sh.lin@mediatek.com>
Date: Mon Dec 19 22:13:54 2011 +0800
Fix build fail when no --enable-unittest option configured.
commit 2bd5a857d7ca2028af8094da681d388e33922d1e
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 19 21:42:13 2011 +0800
Implement place() in Relocation
Add Layout.h and Layout.cpp into Makefile.am
commit 1f0ff309b4d4b1d6f1cb57f2827c392c350c5368
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Mon Dec 19 15:57:40 2011 +0400
Fix a comment.
commit d898c017e3b588d6f80e7d78d08f4965f5210a97
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 19:05:09 2011 +0800
Make git ignore ltoptions.m4.
commit f3e15d2ae0cb682268de2f15c4f6edc484a96660
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 19:00:29 2011 +0800
Fix patch/LLVM.patch.
Silence warning.
commit faee70930939d2c8d0322839af0da5f347f55c42
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 18:55:29 2011 +0800
Add MCLinker::addGlobalSymbol() and addLocalSymbol()
Standard symbol, target-depdent symbol and readers can use these functions to insert
and resolve symbols.
commit cf36dcd5dd202c934678818811793198ee62efc0
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 18:54:30 2011 +0800
Resolver should also return the resolved ResolveInfo.
commit a3bbc16ac5147c3108bf282bdba95e7a45c0207e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 18:35:52 2011 +0800
Remove redundent functions in PLT.
Use member functions in MCSctionData.
commit 63e692db6a3ac134c265b6a6e0ffb187d31ab7a5
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 17:57:37 2011 +0800
Remove redundent headers.
commit f2ed2b5917116a3d82c7221818a47767fb215550
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 17:47:28 2011 +0800
Add missing options used in LLVM trunk@146714.
commit 4bcd5f4b6c936e1ea3eeae1ac966612fac562ee4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 17:03:47 2011 +0800
Migrate to LLVM trunk@146714.
Build MCLinker with LLVM trunk@146714.
Update the web page "Getting Started" as well.
commit f16e41abd14acd1fa324ab497293e174b39a81af
Merge: d95e32a 2b71280
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Mon Dec 19 16:22:10 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit d95e32a1df3a30c9fa90cec5585386f3d1258880
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Mon Dec 19 16:16:09 2011 +0800
don't track generated .m4 files
commit 2b7128027392f16909afbc4f5600778d5a6c3878
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 19 16:14:38 2011 +0800
Modify PLT amd add class ARMPLT
1. Let PLT inherit to MCSectionData
2 Initialize PLT by incoming parameter LDSection
(Instead of create LDSection itself)
3. Add class ARMPLT which inherits to PLT
4. Add ARMPLT.h and ARMPLT.cpp into Makefile.am
commit 964f9199fa6d287eb9a452894457cc322fa62629
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Mon Dec 19 16:14:04 2011 +0800
add generated .m4 files
commit ed95bb627f3f519ec3a6c71f41279fb4f0944c50
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Mon Dec 19 16:04:25 2011 +0800
test
commit b79bd46262d88553ab48f3ea80c7a2a77d0eeafc
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 19 15:15:37 2011 +0800
Add a series of init/fini sections in ELFDynObjFileFormat.
commit b3be2785a7b892e9b8c3fc42adcc4c856f44dd77
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 14:31:22 2011 +0800
Move the call of `adding the target-dependent section' from GNULDbackend to MCLDDriver.
commit cce2a8aca3b3dd6ebd4e419b556b7445b5eb938a
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 14:05:37 2011 +0800
For conforming to gcc on Linux -
Add the return type of the template proxy
commit 79a63702d6f79255d3ad5c5702adfb2518417ea0
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 13:52:07 2011 +0800
Revert "For conforming to clang on BSD -"
This reverts commit 5829fb9074efcc5a693e788f0c5822082f0d0844.
commit 5829fb9074efcc5a693e788f0c5822082f0d0844
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 13:41:38 2011 +0800
For conforming to clang on BSD -
Remove the return type of the template proxy.
commit f33989cf39002f9f680706b870696f45261dc63f
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Mon Dec 19 11:36:38 2011 +0800
Fix page-align logic of MemoryArea.
commit f2d10e4796b895a3ba87e9f97ebba7f26b75c25d
Author: Chinyen Chou <petechou@gmail.com>
Date: Mon Dec 19 10:20:42 2011 +0800
Refine the script used by "add_class" to create .h and .cpp files from template
commit 26725499f6104c7ddf1cd78e426c8396809ffddf
Author: Jason Lin <sh.lin@mediatek.com>
Date: Mon Dec 19 10:25:53 2011 +0800
Fix build fail.
commit 1d6aeaa24ffb2dc82a8b516efb13dbdbe646b6d9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Dec 19 09:31:44 2011 +0800
A quick patch for fixing build failure.
commit e3c72cbc2643120ec4b3395fc4530f88547e8fae
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 05:43:52 2011 +0800
Finish the basic method to create standard sections.
The approach is very similar to llvm::MCAssembler.
- We replace MCObjectFileInfo by LDFileFormat.
- We put all LDSections among all inputs and output files.
- We use LDFileFormat to create standard sections.
- Target uses LDContext.getSectFactory() to create target-dependent section headers.
- Target uses MCLinker.createSectionData() to create the section data.
------
Because we have to create different type of output files.(DSO, EXE, OBJ)
So, we need more kinds of LDFileFormat -
- ELFObjectFileFormat
- ELFDynObjFileFormat
- ELFExecFileFormat
ELFFileFormat is the basic template for all ELFXXXFileFormat.
------
I put LDSections into LDContext, and put llvm::MCSectionData
int MCLinker. Every input file has its own LDSection list. But all
(llvm::MCSectionData::Section* Section)s point to the output's LDSections.
------
GOT should be a kind of MCSectionData and GOT::Entry is a kind of llvm::MCFragment
commit 04f0003bf35756802c4db3f98bbfb97d9872eb3c
Author: luba <lubatang@gmail.com>
Date: Mon Dec 19 05:33:37 2011 +0800
change the definition of GOT.
Let GOT is a kind of MCSectionData, and GOT::Entry is a kind of MCFragment.
commit 0fa8746d3b81aa7581beac7346088595cdb31963
Author: Chinyen Chou <petechou@gmail.com>
Date: Sun Dec 18 16:31:01 2011 +0800
Remove the SectionList reference in SectionMerger.
Using the section_list_iterator provided by MCLinker is enough.
commit b7d7c1a757de72a7691effe57a3b80f4c85bca28
Author: Chinyen Chou <petechou@gmail.com>
Date: Sun Dec 18 16:25:34 2011 +0800
Add empty class for DynObjFormat and ELFDynObjFormat.
commit 5ef0cba0ffd2c15f15d2db1d9733c7c34aebb46e
Author: luba <lubatang@gmail.com>
Date: Sun Dec 18 16:07:03 2011 +0800
add memcpy() in MCFragmentRef.
commit 013eae897c65d387e997ce9cad5a8d89c0985e5f
Author: luba <lubatang@gmail.com>
Date: Sun Dec 18 16:05:33 2011 +0800
ABS symbol should be handled as Global, Define symbol.
commit d6a46b0cc622b1dd537cd879a76b5cf06daa73cc
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Sun Dec 18 11:14:32 2011 +0800
Change type Address from char* to unsigned char*.
commit 6d64dcd4c26c8426d69b61d153e97d3a160d3ffb
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sun Dec 18 01:22:36 2011 +0400
Fix a comment.
commit 75d643ff0987a675a78ce5fb93ca019fb9915cc9
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Dec 17 23:16:40 2011 +0400
Improve R_MIPS_LO16/R_MIPS_HI16 relocation processing methods.
commit a1a90389549cb7caf517b2343ad4a25529c985f7
Author: Jush Lu <jush@Jushteki-MacBook-Air.local>
Date: Sat Dec 17 23:57:40 2011 +0800
The section name of GOT should be from parameters.
The section name may be ".got" or ".got.plt".
commit 3cc417bd06d2155a941ad58cfb15741a1f85ded1
Author: luba <lubatang@gmail.com>
Date: Sat Dec 17 21:56:55 2011 +0800
Add ABS in ResolveInfo. The symbol has an absolute value that will not change
because of relocation.
commit 32fecd13ecb24eb9938bbf738da211ef32d4aac9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 16 16:08:59 2011 -0800
PATCH: include <sys/stat.h> before using stat
Hi,
On Fedora 15, I need to include <sys/stat.h> before using stat system
call. This patch fixes it.
--
H.J.
commit bc6734b7b32c2b9e34147c27aba9f6f548cd87fb
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 16 16:06:25 2011 -0800
PATCH: Add -Wformat for -Werror=format-security
Hi,
GCC on Fedora 15 needs -Wformat for -Werror=format-security. Otherwise,
it will give an error. Here is a patch to fix it.
--
H.J.
commit b751ba2c4be668067a4070e6c3cadec9d52c2ee6
Merge: d0976f3 71cbee1
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Sat Dec 17 17:52:39 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 71cbee1acd81241ee1908b96eb82376719b8e083
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Dec 17 11:37:13 2011 +0400
Add five new placeholders for Mips relocation handlers.
commit 7b2b6957f8021aa7c9a3bf6be8370117109d663c
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Sat Dec 17 11:03:58 2011 +0400
Single equal sign is a more portable way to compare strings in a shell script.
commit d0976f3fb6c701c4925b7787aa56d75e6e796a88
Author: Jush Lu <jush@Jushteki-MacBook-Air.local>
Date: Sat Dec 17 12:39:36 2011 +0800
Make PLT have a LDSection.
commit 6a04339e16bf68a6af0f4ff6f82d83053218aafa
Author: Jush Lu <jush@Jushteki-MacBook-Air.local>
Date: Sat Dec 17 12:11:31 2011 +0800
Declare LDSection as member data of GOT.
Because GOT always has a LDSection,
declaring it as member data to avoid new, delete, and possible exception.
commit cb8b34e4e3069323a97fdbcc9fc952baddccf829
Author: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Sat Dec 17 10:25:31 2011 +0800
README: add source ./scripts/envsetup.sh
autogen.sh: libtoolize is named glibtoolize on OS X
commit de13226ca6f60248a20458b4347afa040e0cab77
Author: pete <petechou@gmail.com>
Date: Fri Dec 16 22:37:32 2011 +0800
Add SectionMerger class.
commit 3c7adc64543265f66e132997c3da23f682e5dba4
Author: pete <petechou@gmail.com>
Date: Fri Dec 16 21:45:41 2011 +0800
Give SectionMap a default mappings for ELF format based on gold linker.
As reading object files that are compiled with -ffunction-sections and
-fdata-sections options, this will give better performance.
commit ef81a97de44e75f630999d62d2ad5489b440b88a
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Fri Dec 16 16:30:37 2011 +0400
Add a couple of trivial Mips relocations.
commit a58abd469d9efdb8135e8a49dcda7cf1c41a5f65
Author: pete <petechou@gmail.com>
Date: Fri Dec 16 20:00:32 2011 +0800
Add SectionMap class.
SectionMap describes the mappings from input section's name (or prefix) to it
associated output section's name.
commit 32e7c33fe84f6a2f1d7e9ecd589b121165483ee9
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Fri Dec 16 15:49:59 2011 +0400
Small set of corrections in the Mips related files: headers,
comments etc.
commit 921c4243aebd8a2de573935641589f345060c218
Author: pete <petechou@gmail.com>
Date: Fri Dec 16 19:03:23 2011 +0800
Add SectionFactory class.
commit 40d79dfaf7a917ea07189318885299f1bc702cfa
Author: pete <petechou@gmail.com>
Date: Fri Dec 16 19:02:51 2011 +0800
Add rule to ignore *.o in .gitignore
commit 2b5181f9a8ce07e780a721cd7f47a4c0dcc58437
Author: Jason Lin <sh.lin@mediatek.com>
Date: Fri Dec 16 17:41:45 2011 +0800
Add 64bit object file output support
commit 060d3cc2818202c4b9af18ae304fc7921b767263
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 16 17:21:23 2011 +0800
Move ARMGOT and ARMPLT to separate header files.
No funtionality or interface change.
commit 9388bb27659329e44c76e5dba9a77bcd203ebd26
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 16 16:59:18 2011 +0800
Remove the duplicate member functions in GOTEntry and PLTEntry.
Use the member functions inherited from MCFragment instead.
commit 8711bed79380c375975ef467d36f9ce30fe89768
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:30:33 2011 +0800
Add GOT, RelocationFactorys in the compilation list.
commit f9c9383df1f1abc14e1bd908bc906c06eb76ab88
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:26:55 2011 +0800
Sorry for the big change. But I think the new architecture is easier
to understand. All that targets need to do becomes list all relocation
function prototypes in ARMRelocationFunctions.h (C functions) and
implement each C function in RelocationFactory.cpp.
commit 575d3feda1e5f308234432bb18617fb6ef037bac
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:24:04 2011 +0800
Add new GOT class.
commit 0a9435c5a34fa5e74abeb73c60cbbec3ef645086
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:23:20 2011 +0800
Refine typo and style.
commit 4bdffe67869f16f6372036c8ae54535811157f04
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:20:09 2011 +0800
1. The relationship between relocation and relocation factory is fixed. (rarely chang in the future)
i. Relocation ask RelocationFactory to apply the relocation.
ii. Client only need to know Relocation::apply()
iii. Targets need to implement RelocationFactory::applyRelocation()
commit a5391acadf5786272e6d5885529bf65a2db8b889
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:18:43 2011 +0800
add empty Layout::getFragmentOffset()
commit 12e5edbd37939e9d918b10cc731025f238a5699d
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:17:00 2011 +0800
make LDSection more loosely-couple with MCSection.
Do not reuse llvm::SectionKind. Use LDFileFormat::Kind instead.
commit 11f4c1e05468ba91fd7bcc8c61a895e88dc2d5d6
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 16:15:27 2011 +0800
add GOT kind in LDFileFormat
commit 0fdcb434d63cfc402976e16ec238e0a74503d439
Author: Jason Lin <sh.lin@mediatek.com>
Date: Fri Dec 16 15:58:24 2011 +0800
Add ELF header write out function
commit daa6fcf1a064d5fdaf3ee8c6c8115637caa57792
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 16 15:24:50 2011 +0800
Use angle brackets to include LLVM header files.
commit e26a9a839e9d1fe68d799359494e3c13cd359074
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Fri Dec 16 15:01:15 2011 +0800
Refine error message. Replace tab by 2 spaces.
commit 3c6be9b1a481fe3b281be441bc58996a54a21cf2
Merge: 35634c1 3233a0d
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Fri Dec 16 14:54:34 2011 +0800
Merge branch 'master' of https://code.google.com/p/mclinker
commit 35634c1eb8228ae186d8df4a4fa2fc4edcdcba12
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Fri Dec 16 14:48:23 2011 +0800
Enhance MCLDFile and MemoryArea handling.
1. Add property filesize for MCLDFile.
2. Change MemoryArea.request for read-only and read-write.
commit 3233a0deffb18a4db5a3945dc317d9fc60e77c61
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 16 14:50:11 2011 +0800
Fix the warning from getcwd.
Fix the warning:
ignoring return value of 'char* getcwd(char*, size_t)'.
commit 669748343ec4ff2286c92b8f96a51de7918a03d7
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 16 09:08:38 2011 +0800
Use ResolveInfo type definition of symbols
1. Use ResolveInfo type definition of symbols instead of llvm::ELF
2. Clean spaces and tabs
commit 07a1c8c177b86e719b0ca5478ecc818558d7b101
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 16 08:59:25 2011 +0800
Fix build failure.
Remove #include MCLDCommand.h.
commit 1e1f1c85c1e4067eb838c6ea7a43eebd2c41f270
Author: luba <lubatang@gmail.com>
Date: Fri Dec 16 03:55:12 2011 +0800
Refine ResolveInfo.
1. fix many bugs of access the description and type of the symbol
2. change the function name from the original type() to desc()
3. add new function type() as ELF_ST_TYPE
4. add unit-test cases
commit f3941aad56c54aead525cb0a71f546df3e42b85c
Author: luba <lubatang@gmail.com>
Date: Thu Dec 15 20:06:55 2011 +0800
remove obsolete code.
commit 83c71bd31e8de366f55b6f1a00e7d946bbb1307c
Author: Jush Lu <jush.msn@gmail.com>
Date: Thu Dec 15 23:15:57 2011 +0800
Move ARM GOT and PLT entries to ARMLDBackend.h.
commit 9ef46fc7152eacdd251fde570b5c336158ce9273
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Dec 15 18:16:55 2011 +0400
Define virtual function MipsGNULDBackend::machine().
commit f313fbf40bb6bf0eed62cfc15c763d0631e25343
Author: Jason Lin <sh.lin@mediatek.com>
Date: Thu Dec 15 21:14:27 2011 +0800
Force implementation of TargetLDBackend provides machine information.
commit 4e2fb98fa6878095a3fe6f64901a645872b5fd78
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 15 21:03:01 2011 +0800
Implement GOT and PLT entries for ARM.
commit f99e9e47389a8134cf5aa553be645ff140c8c2e4
Author: luba <lubatang@gmail.com>
Date: Thu Dec 15 19:37:52 2011 +0800
Add some common testcases for static symbol resolutions.
Also add these testcases in the compilation list.
commit 47373998b2fb96d571782d85dc38c5b7648d02d7
Merge: 47dcf73 4f50b2b
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Dec 15 14:16:24 2011 +0400
Merge branch 'master' of https://code.google.com/p/mclinker
commit 4f50b2bf6d025896efed3e90e9a5746f58c89376
Author: luba <lubatang@gmail.com>
Date: Thu Dec 15 17:58:35 2011 +0800
Fix bugs
The StaticResolver uses a table to drive resolution process.
The row and the column do not match to ResolveInfo::m_BitField.
commit cda66ba64e9a763bab015ce23d0843e9459b3354
Author: luba <lubatang@gmail.com>
Date: Thu Dec 15 16:27:11 2011 +0800
Fix a bug
ResolveInfoFactory produces the ResolveInfo with wrong types and bindings.
commit 929e39ebb0b8492d298f8e0e5d60ef9cd11520e0
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 15 15:39:32 2011 +0800
For performance concern, WriteSameuint(8/16/32)_t takes uint32_t.
commit 8c765870568f812c0e3d4ccc9fd6641230a1305b
Author: luba <lubatang@gmail.com>
Date: Thu Dec 15 14:45:35 2011 +0800
Fix the bugs in script builders
Because we change our building system from BOLD (the old project name) to
MCLinker (the new project name), so these scripts have to be changed consistently.
commit de74f82f4f04db1af3ed9343dcdd9656a9356b18
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 19:47:46 2011 +0400
Declare ObjectReader::readSections() as an abstract virtual function.
commit caabf5794e85613a1e5938bcc8be4fffdbed94f4
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 15 10:05:41 2011 +0800
Fix ScopedWriter boundary issue.
1. m_Cursor+sizeof(TYPE) <= m_Region->size()
2. Write16 should use uint16_t as argument
commit bdfa73736e01bd02fad99ea54d9fe3112920af94
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 15 10:06:46 2011 +0800
Add ELFDynObjWriter initial code.
commit 47dcf7300d14a29a7f8270b0cf6e5c76888ea303
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Thu Dec 15 00:15:10 2011 +0400
Add stub classes to support mipsel target. The classes do nothing yet.
commit 0a257babe6fa86cf8b459a79558bb0367969b41e
Merge: 4a9b922 07ef497
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 19:49:40 2011 +0400
Merge branch 'master' of https://code.google.com/p/mclinker
commit 4a9b922f1de76dc5ffd1542438d65fc99fec26fa
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 19:47:46 2011 +0400
Declare ObjectReader::readSections() as an abstract virtual function.
commit 07ef4971433ed8a3af54b6b8fc5a20b79ae07552
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 23:27:08 2011 +0800
add symbol tables in LDContext.
MCLinker is still responsible for creating LDSymbols. LDContext is just a bookkeeper.
commit 80ad6432f53cfa9d7626eb5504a92718484ad190
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 23:25:35 2011 +0800
Fix a bug in ResolveInfo
Bug: Previous patch did not change all TOUCH_OFFSET to PLT_OFFSET
commit 2eb467e858ae0647db14c0bcbb560a9bb5452266
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 22:10:21 2011 +0800
Add ResolveInfo::hasPLT() and setHasPLT()
Which comes first? Applying relocations or creating GOT/PLT? This is
like checkens and eggs. Without applying relocation, we don't know
the number of entries of GOT and PLT. But without GOT and PLT's offset,
we can not fix symbol values and applying relocation.
In order to solve this problem, MCLinker separate the creating GOT/PLT process
into two different phases. The first phase is determining if the relocation
entry will produce a GOT and a PLT entry, then *create empty* GOT and
PLT whose sizes are precisely the same with the final sizes. The second phase
is applying the relocation entries, and simultaneously *fill* the GOT and PLT.
ResolveInfo::hasPLT() and setHasPLT() are functions for the relocation entry which
refer to the symbol. If a relocation entry needs to create an empty entry, than
the symbol is setHasPLT(true). And when applying the relocation, MCLinker looks
up the hasPLT(). If it's true, MCLinker will fill the value of the PLT entry and
GOT entry.
By this two-phase solution, we have no performance lost, and still keep
applying relocation and file layout simply.
Google gold scans relocation entries in file many times to deal with this problem.
But we know the scale of the number of relocation entries are huge, and it is
performance critical for on-device linking.
commit e843b45c684995afce6ea830d6b4d1228ff64774
Author: ras46 <Robert.Lai@mediatek.com>
Date: Wed Dec 14 22:09:45 2011 +0800
Make two typedef(s) public.
commit 6953fab92fef7c55bfb6e0ed83bef3ae16ecc231
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 14:42:47 2011 +0400
Move MCAssembler::setWriter() function definition to the cpp file.
commit eca5451b5d9c6be05977d0924d51a9c980a97bf5
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 14:39:06 2011 +0400
Revert 1fce3a1a1361. The applied patch is obsoleted.
commit 6f829659759631799aa7d5e86257a3c31920c2e0
Author: ras46 <Robert.Lai@mediatek.com>
Date: Wed Dec 14 20:16:06 2011 +0800
Initialize GNUArchiveReader in GNULDBackend.
We need to complete the right ArchiveReader/GNUArchiveReader ctors latter.
commit 7f43c8e73fa01809f5ed56b1184d2aa9ae041300
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 18:08:13 2011 +0800
Fix a bug - MCLDDriver cat readers and writers before they are intialized.
commit 1fce3a1a1361f690d7e7829267f635649417f7be
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 13 16:31:58 2011 +0400
The invocation of delete operator for an incomplete type has an undefined behaviour and g++ shows warning on this. To switch off this warning move MCAssembler::setWriter() function definition to the cpp file.
commit 89cbcb97cbfbf280005aea53b94d829e1bbe6c41
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 13 16:09:15 2011 +0400
Put llvm libraries before the system's ones in the linker commad line. This fix linkage problem when g++ 4.6 is used to build MCLinker.
commit 20403141692eb1174f0521c20c10e5791dbe94b7
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Tue Dec 13 16:08:46 2011 +0400
Finally fix wrong usage of typedef in MCFragmentRef::deref().
commit 8eb2e5c8105f225941132c9fd51f1a9481cc2c7a
Author: Simon Atanasyan <simon@atanasyan.com>
Date: Wed Dec 14 12:16:49 2011 +0400
The autogen.sh do not use external env variable to get path to "m4" folder. It expects to see "m4" folder in the same directory where the autogen.sh is.
commit 2b982d3654d208b912e834b33d1e7335905cf988
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 17:07:31 2011 +0800
MCLinker should pass MCLDInfo for readers.
commit 101af4f0b07b9060cc84b7c79fa27a9760aa63cd
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 15:42:56 2011 +0800
Fix bugs in add_class
Because we change the building system and some environment parameters are
changed, we have to revise add_class script, too.
commit cd088060939c4e1ac75146e21998f26c7e20f6ef
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Dec 14 15:38:26 2011 +0800
Delete redundant file lib/MC/TargetLDBackend.cpp
commit 955c9893c9e9ff065684c7ae7508d92f40881acc
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 15:30:10 2011 +0800
class adapter ELFDynObjectReader connects DynObjectReader and ELFReader
commit 986e95ae9f86b95f89b6728ccaca5932b6d957c2
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 15:11:47 2011 +0800
MCLDDriver checks the result of reading.
commit ad575be2e90ba0bfed99e964c3fc4b460b9fee85
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 15:06:56 2011 +0800
Let MCLDDriver and MCLinker meet Readers.
Finish the basic algorithms in MCLDDriver::readSymbols() and mergeSymbolTable().
commit c707ef3a9c538dfcf8263f46e9751cb35f0dce2f
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 14:51:30 2011 +0800
add DynObjReader::addSymbols interfaces.
commit 92e38888082758b15784da09df2a2399abf1abfb
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 14:49:52 2011 +0800
Initialize ELFDynObjectReader, ELFDynObjWriter in GNULDBackend.
commit 3742ac2e68cefaeb2c3e637943b34dc0f88d42cb
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 14:01:37 2011 +0800
Fix a bug in StaticResolver
Bug: Do not change the row in action_table when get in REFC.
commit ce1f5f24f36cc7a2f9d1f274830dbbceff361e05
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 14 13:57:07 2011 +0800
Add the missing relocation function.
commit ecc3f20182439be3b496abefb8e62acb64ec5b29
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 14 12:58:38 2011 +0800
Move relocation function declaration from .h/.cpp to ARMRelocationFunction.def.
We separate the code flow and the spec to simplify our code.
Once we want to implement a relocation function,
we need to
1. Modify ARMRelocationFunction.def to add new function name
2. Implement the function in ARMRelocationFactory.cpp
commit 3491cccd6e2e67bd41e880cf7cb9ad1524cdfe62
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 13:53:40 2011 +0800
Remove author declaration in the header template.
commit 47de2a6346aec8749344ba015f9418f838e1b562
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 13:50:33 2011 +0800
Add StaticResolver in the compilation list.
commit 4b1a6ad75d0d903b1d8f928b6ac4d35d61e089d1
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 13:49:55 2011 +0800
MCLinker should have StrSymPool for symbol resolution.
commit 06ef7dc8abfa28cb0efc9e8e818e4a50797ac95e
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 13:46:30 2011 +0800
1. Fix bugs in StaticResolver.
2. Let Resolver as a clone factory.
3.In old ResolveInfo, set functions use ResolveInfo defined enum types as the
parameters. For higher performance, change those parameters to uint32_t.
commit 8be180a7c49ff0219886034b32489c3deb2368cc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 14 13:30:00 2011 +0800
Use the University of Illinois Open Source License for new files.
commit 8b7e10a93a8accabc74838f64eb2b15dd87bd66e
Author: ras46 <Robert.Lai@mediatek.com>
Date: Wed Dec 14 13:25:20 2011 +0800
Fix typo for ScopedWriter.
Use pRegion to initialize m_Buffer instead of m_Region.
commit 3c51db281e5d65fa31f87279175b0844a15cfd6b
Author: Anders Cheng <anders.cheng@mediatek.com>
Date: Wed Dec 14 10:49:26 2011 +0800
Support Android SectLinker.
commit aa2fe236bc089cb6cd6f02537f8f91f2f56f8e9d
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 11:39:13 2011 +0800
ResolveInfo::setVisibility should always choose the most strict visibility.
commit b8592f5a219be3cdd9601171091b64a7fabc3765
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 14 11:31:14 2011 +0800
Use the University of Illinois Open Source License.
commit 221faed40cd9054ebd522f52f3b77e07a8bbb459
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 03:03:37 2011 +0800
Add ScopedWriter.
ScopedWriter writes the region and synchronize the region with file at
its destructor.
commit 8eb8bcbd158b129d17ad540b0c93327cb184c595
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 02:59:39 2011 +0800
Finish the static resolver.
The kernel of symbol resolution - StaticResolver.
It can resolve not only the regular symbols, but also indirect symbols.
MachO's indirect symbol can directly use the same StaticResolver.
commit 48284527c99bfed258c14ade91402cf178ddd413
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 02:58:43 2011 +0800
Remove the code in readSymbols(). They can not pass compilation.
commit b460c21691d237d9313028c0f99a3215e6e19a6e
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 02:57:32 2011 +0800
Symbol resolution changes the original symbol, so Resolver::resolve()
must use reference to ResolveInfo instead of constant reference.
commit 3b2c5349998bb780a00ff31e901738c938474a12
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 02:54:45 2011 +0800
1. move size and value fields from LDSymbol to ResolveInfo
2. Because indirect symbol use value field as the link to the other
ResolveInfo, change the interface of ResolveInfo.
commit 938968f24c9397f1742726527adad32886604c77
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 02:53:28 2011 +0800
Fix some missing headers in Layout
commit 65f5588158b5d2b5c26e33b5977d1806c440d10f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 14 10:59:02 2011 +0800
Fix building system.
Fix the build failure when building MCLinker in separate building directory.
commit b661426ec46d6bd6f17a5b83520a225bb370efae
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 10:18:34 2011 +0800
We are currently the external project of LLVM.
So, use include `<' `>' instead of `"' `"'
commit 798f14f04306c2d16d015436a9d338f4ea792f0e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Dec 14 10:17:42 2011 +0800
Add files generated by autogen.sh to .gitignore.
Based on a patch by Simon Atanasyan.
commit 0b5b26087708fa0934def8ecff234c581f1510b0
Author: luba <lubatang@gmail.com>
Date: Wed Dec 14 10:13:20 2011 +0800
Change the building system.
Move the placehold of object files from tools/llvm-mcld to debug and optimized.
Change script/envsetup.sh to export environment ${MCLINKERTOP}
commit fe83d4c55fbbfdef3525fca64fc83ae81b78b946
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Wed Dec 14 09:22:38 2011 +0800
[Patch] llvm::StringRef cannot operator+.
Use std::string instead.
commit fde52a66fcc382e23bd81a467d192e87b6ddb336
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 13 22:24:07 2011 +0800
Oops! Method overriding becomes hiding.
Fix the signature of BSDArchiveReader::isMyFormat().
commit 22a773fb7237dba0200acae47700aca94612269c
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 13 22:20:11 2011 +0800
Add remaining relocation applying functions.
In order to meet our 1st milestone, I write the
scaffolding of applying functions which can seen
in LLVM lib/MC/ELFObjectWriter.cpp.
There are still some functions not mentioned, and
they will be invoked with ARMRelocationFactory::none().
commit f819b7bb2afbede7caa8cda9b7d958f29b6d7c58
Author: pete <petechou@gmail.com>
Date: Tue Dec 13 21:15:44 2011 +0800
Revise the file headers.
commit 1d1e70b22424aba665f58ae9b9b0fb42dd1e5a1d
Author: Nowar Gu <wenhan.gu@gmail.com>
Date: Tue Dec 13 20:46:05 2011 +0800
Add return enum of ARM relocation status;
Every private relocation function to be applied
should return the value of enum ARM_Reloc_Status.
commit 7e33978829dbee73c47af915c3be34b85653abf9
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Dec 13 20:35:30 2011 +0800
Include llvm/Support/ELF.h as symbol type definition
Clean space
commit 753dc5889cc09e10fe641c8746edbb6e5664d233
Author: Diana Chen <diana.chen@mediatek.com>
Date: Tue Dec 13 16:55:18 2011 +0800
Relocation and RelocationFactory
1. Remove destroy() in ARM and X86 RelcoatoinFactory
2. Add APIs to RelocatioFactory
3. Add a few applying functions to ARMRelocatoinFactory
commit 2f3f17784da3c591d7b8a642597539197ffd5878
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 13 16:54:50 2011 +0800
The development of MCLinker migrates to code.google.com .
commit 5ca1aba0f951f00bcd957c859e0fe55ad2b36c56
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 13 16:25:56 2011 +0800
Use the University of Illinois Open Source License.
commit c38947f7a889eaeef517a07e057fe2ecfdbab643
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 13 16:19:45 2011 +0800
Remove redundant "#include <iostream>".
commit 2c3b6bdd90ba5202fcd65c1f90bc24fac340b16b
Author: pete <petechou@gmail.com>
Date: Tue Dec 13 14:12:54 2011 +0800
Fix build break.
commit cd145bcdf7178b4a91a30ebc90579b26787156ff
Author: luba <lubatang@gmail.com>
Date: Mon Dec 12 21:35:28 2011 +0800
Layout laid out the sections and fragments
commit 4652987bb676a4e04db7716515a8c414ee3933ef
Author: luba <lubatang@gmail.com>
Date: Mon Dec 12 21:33:47 2011 +0800
LDFileFormat describes the common object files.
commit d32477944af36fa03689d0d3762d3c55b361ee84
Author: luba <lubatang@gmail.com>
Date: Mon Dec 12 14:57:40 2011 +0800
Fix a bug - set the wrong type of mcld::Input
commit 95586130a0ae4afee1a8b9c2aa41ded57489df75
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Dec 13 15:44:00 2011 +0800
Merging mainline.
commit 2bf6851902b2f2df82a6abe6eb26b434af43014d
Author: luba <lubatang@gmail.com>
Date: Sun Dec 11 01:08:51 2011 +0800
Fix wrong usage of typedef in MCFragmentRef::deref
Thanks Simon. By his suggestion, I correct the wrong declaration of deref().
commit 70234d9a318e40bc63d60e59d4ee33f63739bbb5
Author: luba <lubatang@gmail.com>
Date: Sun Dec 11 00:56:14 2011 +0800
Set new TODO - implement SectionMap and SegmentMap
commit 11b3bd488bad5ea822d5bef55a76ed38c6204a8b
Author: luba <lubatang@gmail.com>
Date: Sun Dec 11 00:52:10 2011 +0800
Add LDSection in compilation list.
commit 6c4c3e5c73e752f651a230f0ace48e702081f8a5
Author: luba <lubatang@gmail.com>
Date: Sun Dec 11 00:40:43 2011 +0800
LDSection should be a kind of MCSection.
LDSection has name, type, flags and offset of a section.
MCLinker reuses llvm::MCSectionData. llvm::MCSectionData only contains
partial information of a section, such as real data size and alignment
constraint. We complement the rest information by put them in LDSection.
LDSection is designed for both ELF and MachO. We do not consider about
WinPE when we designed it. So, WinPE may not use it.
commit eeb2e9754dc7e301bf66cb1c4a752155eeb3c589
Author: Jush Lu <jush.msn@gmail.com>
Date: Sun Dec 11 00:34:54 2011 +0800
Update patch/LLVM.patch and patch/README.
We use LLVM RELEASE_30@145348 now.
Checkout it by
"svn co -r 145348 http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_30/final llvm_30"
commit 3f8342044be5e63e45922943bfb93dc949ec5486
Author: luba <lubatang@gmail.com>
Date: Sat Dec 10 22:11:36 2011 +0800
Every debt has it debtor :p
commit 5778cd114cd07e3e1433dac5bdc1afab4d9d3e76
Author: luba <lubatang@gmail.com>
Date: Sat Dec 10 21:59:07 2011 +0800
Add 'prepare LLVM' sections in the README
commit 0078964a9df503c358ef5fa2eb23f71cdd50631a
Author: luba <lubatang@gmail.com>
Date: Sat Dec 10 21:44:18 2011 +0800
Add MCSection::SectionVariant a new variety - LD_Context
Since MCLinker uses LDSection as a common representation of section headers,
we need a new variety of section.
commit 3098c5a0851e99fde77f5f2376165ffe42ccf5c9
Author: pete <petechou@gmail.com>
Date: Fri Dec 9 14:18:28 2011 +0800
Add missing MCLinker header in MCLDDriver.
commit eda322c15b5dfd36430be4f7eea70e687aebd71d
Author: luba <lubatang@gmail.com>
Date: Fri Dec 9 13:47:09 2011 +0800
Initialize MCLinker
In MCLDDriver::initMCLinker, MCLinker and all readers and writers are
initialized.
TODO:
In the same function MCLDDriver::initMCLinker(), MCLinker should initalize
all internal data structures, such as segments, sections, and symbol tables.
commit 22f0fad5630050abf970850bf4ec66d50250daa7
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 22:56:35 2011 +0800
Fix bug - hasContext return opposite value.
By Simon patch/LLVM.patch
commit 5e56d91d52fceb8cdc7f9ea813cd272c1b710abd
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 22:02:06 2011 +0800
Fix a bug - hasMemArea return opposite value.
By Simon Atanasyan's patch.
commit 45d47f655e8ffd71e6a7cf42c1ba913f51ce8b87
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 8 21:41:39 2011 +0800
Add general apply function interface into RelocationFactory
Remove function pointer in Relocation.
commit b7c194ca85a7f7b8af18173c68bae40e72ffce14
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 8 20:58:09 2011 +0800
Change type of apply function pointer to pmf
Apply functions in RelocationFactory should be non-static.
Use pmf on Relocation to hold the pointer.
commit 7dc044b48c2ca4a67a76d3d82fef554963225935
Author: Diana Chen <diana.chen@mediatek.com>
Date: Thu Dec 8 16:39:09 2011 +0800
Add Relocation and RelocationFactory prototypes
Remove ARMRelocation and X86Relocation.
Define RelocationFactory and apply function prototypes.
commit a2de45a96b5f661b273fc4db2540c22ebd6373e4
Author: pete <petechou@gmail.com>
Date: Thu Dec 8 15:00:17 2011 +0800
Remove mcld::StringMap, its testcase, and related code.
commit ffdc2452a71e8389f2f3d267f54ada53d5029839
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 8 13:34:45 2011 +0800
Add new MCFragment types FT_GOT and FT_PLT to LLVM 3.0.
commit 633842441e9bc64d69e682070f85ead306ce6749
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 10:34:01 2011 +0800
Add some basic functions in MCLDDriver.
Because in these early version, algorithms are simple. So I directly write the functions in SectLinker.
commit 9f7c4e27d314bd58bb363335272deaf885732b9a
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 03:15:07 2011 +0800
Add some ARM target backend scaffoldings
- Relocation Factory
- Relocation
- Backend
commit 814dd5ead01058162c85017e0fbefdf323b44671
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 01:33:32 2011 +0800
Add some target callback functions for overriding.
commit ec519d96ead369d48c6329c82c8d1b9d4f2f57b9
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 01:29:38 2011 +0800
Add GOT scaffolding
commit dcd1bab5fa09334ad21a8f8e68fb258b483728a4
Author: luba <lubatang@gmail.com>
Date: Thu Dec 8 01:15:54 2011 +0800
Add scaffolding of PLT
commit 26b0df4f58214c5769a3b947c93d3ba3f5e87381
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 5 21:23:36 2011 +0800
Add RelocationFactory interface
Add RelocationFactory into Makefile.am
commit 58ad32a8084e64769da2ad871f7ed59cc0061105
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 5 21:21:04 2011 +0800
Change relocations type to std::vector
commit b68dcea42a93b93f2de690a36352040ae095f7de
Author: Diana Chen <diana.chen@mediatek.com>
Date: Mon Dec 5 21:19:19 2011 +0800
Add resolveInfo() into LDSymbol
commit 8ed0f131cbdc717057ebe3fab16bb8c73987148c
Author: pete <petechou@gmail.com>
Date: Mon Dec 5 16:25:48 2011 +0800
Rewrite PathCache of Directory to use mcld::HashTable instead.
commit c222b70e1e6eb7789368002cc5cd850a5db0ac09
Author: luba <lubatang@gmail.com>
Date: Mon Dec 5 00:57:49 2011 +0800
Finish StrSymPool, and define Resolver's API.
Let resolver has more control for symbol resolution.
Resolver now can be inherited by static resolver for static linker or by
dynamic resolver for dynamic linker.
commit 35dd88a5fdb9b69b65c7d008047cccf36b990593
Author: luba <lubatang@gmail.com>
Date: Sun Dec 4 14:17:31 2011 +0800
Change include file - stdint.h to llvm/Support/DataTypes.h
commit 5731c3e1afdb7ec4ee66493ae0b0d5a673c349e2
Author: luba <lubatang@gmail.com>
Date: Sun Dec 4 14:17:00 2011 +0800
Add BranchIsland and Stub
Not implement yet.
commit 7f3fae69146dc3c05c43a791eead40e70e8eab37
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 2 18:13:31 2011 +0800
Relocation inherit to ilist_node
commit 87b30c7ec68593f8688426d402303dd8c3c2413d
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 17:44:10 2011 +0800
Add TargetLDBackend::applyRelocation interface
commit a472c0a9362ec080a26bd8ae04299ccea88f21c5
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 16:39:20 2011 +0800
Add empty class of Group and Layout
Group and Layout are two classes used to finalize the layout of regions.
commit 5a546a1459f16d061bc17bd589e7644d88dd5fed
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 16:31:56 2011 +0800
Add Howto and Relocation into make list
commit c2ebf70bccf6cc890f060e0445029d18b0e01260
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 16:31:12 2011 +0800
Add Howto
add Howto as the common information of relocation entries
commit 70dfc86d8dbdf25d7e03b2b05cd7173e6dad1670
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 16:27:39 2011 +0800
Add MCBitcodeInterceptor
MCBitcodeInterceptor intercepts data in MCAssembler.
commit f9d450da825e76b8dd2f780a0c334ad3159158b4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 2 16:18:05 2011 +0800
Build MCLinker with options which are used in Android.
commit 1c1577cfc9e38edd1964344c39feae7e95575c0e
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 16:08:04 2011 +0800
Change MCAsmObjectReader to MCBitcodeInterceptor
commit ef7de030bd3381a770ac493e1feb1265d15874d0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Dec 2 15:46:27 2011 +0800
Fix build failure when building MCLinker without "--enable-unittest".
commit 19e2d77416d84552f9316b43c7b9cbac7ccdf31e
Author: pete <petechou@gmail.com>
Date: Fri Dec 2 15:08:29 2011 +0800
HashTable
1. refine the interface of const interator
2. refine begin iterator (advance if needed)
3. refine the interface of string hash and compare functions
4. enable the unittest of hash table
commit 7ce917c0ec2426096a4bdbe24c8e4e58a696994c
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 14:55:49 2011 +0800
Remove obsolete code
commit 4bc81fb85bca2b06f4db472532079e0e903a84b4
Author: luba <lubatang@gmail.com>
Date: Fri Dec 2 14:46:39 2011 +0800
remove obsolete codes
commit 63cb8f09d0b36b03eded8a4b097a9109e16f1128
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 2 09:03:51 2011 +0800
Change type LDRelocation to Relocation
commit 0cebccd14965f785536742b9b7b6a1fce5b17c5c
Author: Diana Chen <diana.chen@mediatek.com>
Date: Fri Dec 2 08:46:47 2011 +0800
Remove including file LDRelocation.h from lib/MC/MCAsmObjectReader.cpp
commit 4cac453872b143007c18bea5d55b688866fc2d5b
Author: ras46 <Robert.Lai@mediatek.com>
Date: Thu Dec 1 16:36:14 2011 +0800
STLport needs std::less const version.
commit 814c017983096d3e67df561c18657804fc0371bf
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Dec 1 14:36:59 2011 +0800
Use ${TOPLEVEL} instead of ".." in Makefile.am.
commit 49814ae1bb6bd86ced88a5edd76ef0def5b8b592
Author: luba <lubatang@gmail.com>
Date: Thu Dec 1 14:11:53 2011 +0800
1. rename LDRelocation as Relocation
2. change the interface of RelocationFactory
3. refine the API of Relocation.
commit 36dd5efc9e85f180d0636269724099044407f7a4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Nov 30 21:22:06 2011 +0800
Fix bug where MCLinker generates empty object files.
commit 12825372ce875ccc72d30bfd4e2f17f3c49d5c31
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Nov 30 18:02:24 2011 +0800
Add MCDataFragment and MCInstFragment
commit 1b9339ebb1a1baff100c1a82e7af7b05ade4b718
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Nov 30 11:08:21 2011 +0800
Remove symbols related definition in LDContext
commit 9421ba3955ee189ae9b3b437d10f11b2f2e5a978
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Nov 30 10:29:05 2011 +0800
Add LDRelocation, LDHowto and LDRelocationFactory
1. Remove Relocation.h
2. Change relocation type from Relocation to LDRelocation
3. Remove relocations in LDContext and MCAsmObjectReader
commit 9d385e3683813e24a95731a1dbf0675b15a92dfb
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Nov 30 01:07:02 2011 +0800
Add an option of golden model linker.
commit aeae012cc95521b03abf812122174564612195d9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 29 16:23:28 2011 +0800
Move MC/MCLDContext to LD/LDContext.
commit 98975a1aacdd77893a1702cc982ebacbb2e660d4
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 29 15:52:07 2011 +0800
Revert some changes for building MCLinker with LLVM r142614
commit b0956e0091993c6de228683041e24254c9d21891
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 15:27:11 2011 +0800
Add StrSymPool
Use HashTable and ResolveInfo to remember the shared attributes of all symbols.
commit 75c7eefe67b8069c18b5f18db06219a690e9dd7f
Author: pete <petechou@gmail.com>
Date: Tue Nov 29 13:52:35 2011 +0800
LDSymbol: add one missing open brace.
commit 213d67b1693804bc216bef43b7b772cd5f754b94
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 11:51:38 2011 +0800
Add assert()s in LDSymbol and LDSymbol::setValue()
commit 82732c2a798c034290ea297cbec9e7268ce546da
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 11:43:10 2011 +0800
Revise ResolveInfo for adapting HashEntry
add bool compare(llvm::StringRef) and typedef llvm::StringRef key_type
commit d34cdfd3a63cf0afe42d99aa6e0c7dc278bb8b5f
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 10:40:05 2011 +0800
Remove LDSymbolFactory
commit 419a180a9b65280f0840bd2b56dc9366902c2a6c
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 10:33:21 2011 +0800
Accommodate new options - -Werror=format-security -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point
commit 75ba993bf689a6c4037539c6a8e0669174bab800
Author: pete <petechou@gmail.com>
Date: Tue Nov 29 10:15:04 2011 +0800
Fix build break.
1. add key() api in ResolveInfo
2. modify the makefile
commit 9b8ee64fff298d1d2b05840ce07e0f7c77967161
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 10:11:02 2011 +0800
Implement MCFragmentRef::assign
commit 3f89a717f38267887cc8ddc10ae1eaf9806ac43d
Author: luba <lubatang@gmail.com>
Date: Tue Nov 29 09:49:09 2011 +0800
Fix typo-error and add some missing header files in LDSymbol
commit af12e0bade43dba059253bdd0977302e9b553669
Author: pete <petechou@gmail.com>
Date: Mon Nov 28 21:11:23 2011 +0800
ResolveInfo implementation and some refinements.
commit 2c585300f58b247a7b4a96ec45196a32f69d4723
Author: luba <lubatang@gmail.com>
Date: Mon Nov 28 18:28:40 2011 +0800
Separate ResolveInfo from LDSymbol
commit bae8cdff60052729d2e7d2d3516cc9776e20bde1
Author: luba <lubatang@gmail.com>
Date: Mon Nov 28 17:39:05 2011 +0800
Follow ResolveInfo, change the RESOLVE_OFFSET to NAME_LENGTH_OFFSET
commit a75d0db412a3ecbf087633e10bcf5bc2b2023d2c
Author: luba <lubatang@gmail.com>
Date: Mon Nov 28 17:33:30 2011 +0800
Add ResolveInfoFactory
ResolveInfo is a dynamic class whose size is various at run-time.
ResolveInfoFactory creates ResolveInfo and make sure such kind of dynamic
class is only created in dynamic storage.
commit 518bcd6fa243481d19fd94315cddfaa5833f4d69
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Nov 28 16:46:15 2011 +0800
Add new MCFragment type FT_Region.
commit 2386bc39771d8d5a3c252f7b5d3fae9e52e96984
Author: luba <lubatang@gmail.com>
Date: Mon Nov 28 16:15:17 2011 +0800
Add ResolveInfo
ResolveInfo is a common storage for all resolved symbols. It records all
information that used during symbol resolution, such as binding, type,
isDyn and so on.
commit b49abdefd70309d2c311758dbc916256fc2fd8ec
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Nov 28 14:37:05 2011 +0800
Remove non-existent files from debug/Makefile.am
commit c37d8a4e32a6177ce38e8af7bff7614d651cc3bd
Author: luba <lubatang@gmail.com>
Date: Mon Nov 28 14:18:48 2011 +0800
Add SizeTraits
SizeTraits is responsible for defining the numeral system.
commit f88646c19970e5d1839b8d41cd2aabab387cda8b
Author: luba <lubatang@gmail.com>
Date: Sun Nov 27 21:53:59 2011 +0800
Add MCFragmentRef
MCFragmentRef is a reference to *MCFragments.
BTW, in order to compatible to MCInstFragment and MCDataFragment, change FileSystem::Address from unsigned char* to char*.
commit ef4b44d4caa503d5722f253fe92a99ec3b9eafc3
Author: luba <lubatang@gmail.com>
Date: Thu Nov 24 22:57:48 2011 +0800
Remove PZString and finish LDSymbols
Because PZString is impossible to be other classes' member variable, and
it is error-prone, remove it.
Instead, direct add the strings into LDSymbol.
LDSymbol make sure string and symbol is high-possibly in the same cache line.
commit 40f67efb61335d70e18780303b8a24e2612d09ce
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Nov 24 19:32:25 2011 +0800
Add a -soname=name option to store soname in class Output
commit 293c6a2da51ffc7d630fa6af5d642ca0a76eaac6
Author: pete <petechou@gmail.com>
Date: Thu Nov 24 18:45:02 2011 +0800
Refine the erase code.
commit 5847a955218fdf4fcb6d1a30770d8d71ce78de4b
Author: luba <lubatang@gmail.com>
Date: Thu Nov 24 13:44:46 2011 +0800
add PZString::at() prototypes.
commit 802b1e082c84c9b355be5aa18a3653b86865b4a8
Author: luba <lubatang@gmail.com>
Date: Thu Nov 24 13:41:07 2011 +0800
Add PZStringFactory::create functions
PZStringFactory is responsible for creating and destroy PZString.
Since PZString only can exist in heap, it should not be created by normal
user code.
commit c3b40a09c7ad181d9dd9af19c50a0c70a8f743da
Author: luba <lubatang@gmail.com>
Date: Thu Nov 24 11:40:05 2011 +0800
Add the scaffolding of PZString and PZStringFactory.
PZString is a Pascal string with zero terminal.
Because PZString is a kind of class whose size is various, it's only
can be put in dynamic storage. Therefore, it can not use normal allocator.
commit 8c514c26e73af68e96b989b3cf7e23261753003c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Nov 24 11:12:59 2011 +0800
Set file mode bits to most common value "755" and "544".
commit cb0eb5d71785a2cd78a022118ffb7f24aa001e62
Author: pete <petechou@gmail.com>
Date: Wed Nov 23 20:33:52 2011 +0800
1. fine tune the probing performance
2. fix the bug as erasing
3. write testcases for "erase", "clear", and "tombstone"
commit 30abb8e1bc78819ee34b6ecf222059693456d4e7
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Nov 15 16:59:43 2011 +0800
Remove testing example.
commit 5cf25e3524bcde04874b3782b266125d0ba7030d
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Nov 15 16:54:20 2011 +0800
Check llvm 3.0.
commit 9819f43d7ca925f581cdcdffcd22e9a37bb6ec0c
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Nov 15 16:53:30 2011 +0800
Remove lit, we use llvm's lit
commit a251244f111fcf4c80d0682557edc5c36c6e7616
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Nov 15 15:37:02 2011 +0800
Use Makefile.am. Use llvm build dir for test tool.
Now can use some llvm tool such as FileCheck.
commit 9a761813eaacc6354d09be74498c992950aa7b19
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 15 14:35:57 2011 +0800
Changes to fit LLVM Release 3.0
1. generate the diff for llvm 3.0 based on r142614
2. made the corresponding changes about TargetRegistry and TargetSelect
commit 3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3
Author: Evan Cheng <evan.cheng@apple.com>
Date: Wed Aug 24 18:08:43 2011 +0000
Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
3. remove the code for llvm 2.9
commit 61cdc16ec58247719ec881816dc001cd559c31a4
Author: luba <lubatang@gmail.com>
Date: Thu Nov 10 23:21:37 2011 +0800
write comments in HashTable::rehash()s
commit e530bb829207fcf285aa37ec703c19c61e8f4d32
Author: luba <lubatang@gmail.com>
Date: Thu Nov 10 22:57:39 2011 +0800
Add MCRegionFragment
MCRegionFragment is a kind of MCFragment which is used to represent the
section data when reading a object/DSO file.
commit 70ef2cf40a845ac10617405d57df3db7e0eba70f
Author: luba <lubatang@gmail.com>
Date: Thu Nov 10 14:30:56 2011 +0800
Add a some testcases for hash table.
1. a pressure test to insert 4000000 elements
2. test case for traversing chains of the hash table
commit 8dae4b66bbb8ba019a8c24f5a8ef08c3cac03e6a
Author: luba <lubatang@gmail.com>
Date: Thu Nov 10 14:24:06 2011 +0800
1. Change the HashTable from quadratic probing to linear probing.
2. Fix bugs in ChainIteratorBase
At first, we follow llvm, use quadratic probing. However, in llvm, the quadratic function is not real quadratic, it's a triangle function - K(K+1)/2. Some number of buckets, even when the load factor is under the threshold, can not be probed by given triangle function. This will cause a infinite loop in HashBase::lookUpBucketFor. In order to avoid the problem, I change the hash table to linear probing.
ChainIteratorBase::advance behave wrong. It returned when meeting a empty bucket. It should ignore empty bucket.
commit 2e0a251e8e87a30125c27e45ce3b39dd1ae17e2a
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 14:56:03 2011 +0800
Fix bugs in HashTable
Thanks for TDY, we resolve the bug - use the bucket reference that is deleted after rehash
commit 28569f6e455c2d0a9fe077e912842d2d4c81227e
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Nov 9 14:30:34 2011 +0800
Cleanup tests which cannot pass.
commit bfda46018175dfe691451382e2d0be17d396edfa
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Nov 9 11:15:46 2011 +0800
Let tests can use llvm-tools.
commit f77630965e5ae8db82fa83db1080cd122166f702
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 06:34:04 2011 +0800
fix a bug in HashTable::load_factor()
HashTable::load_factor() has typo error. Since it's a template class, typo-error is not easy to be found.
commit 7da98b64d1d0781870abda659a295be3abfa40bc
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 06:09:56 2011 +0800
Add a new testcase - alloc100 - for HashTable
alloc100 sequentically inserts 100 elements into the HashTable
commit 4f461a3a2147e20a363609ffa73738f567a11fb1
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 05:56:13 2011 +0800
Refactoring HashTable
1. make HashTable is no longer limited to llvm::StringRef key type.
HashTable get the type of key and value from HashEntry.
HashEntry::key_type and HashEntry::value_type. HashTable does not assume the key type is based on string. Moreover, the hash function is also not limited to the string hash.
2. move the construction of HashEntry outside from the HashTable.
Clients must pass the factory of HashEntry as a template argument into the HashTable. That is,
HashTable<..., EntryFactory>
The memory can control by the factory. HashTable no longer takes care of it.
commit 5a5694a55753d0a6e68bae33072c578a4b4697ec
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Nov 8 16:27:33 2011 +0800
Move regtests into test/ subdir.
Since MCLinker is not done yet.
`make check' will get 4 errors. That is okay.
commit ad0e76dcaa623db67ff9eb58667b7249a8a10d13
Author: luba <lubatang@gmail.com>
Date: Thu Nov 3 02:54:41 2011 +0800
Unit test of mcld::HashTable
Only few cases are tested. Please contribute more cases.
commit 3f09d3c77917baebee346283caf64665f6f74f68
Author: luba <lubatang@gmail.com>
Date: Thu Nov 3 02:51:38 2011 +0800
A HashTable whose hash function is changable
Since the hash function in linkers can be changed in GNU ld, MCLinker should
provide such feature to change the hash table. mcld::HashTable is the implementation.
Features:
- Can change hash table
- User defined hash entry - Symbol table uses this feature to keep string and symbol in the same cache line.
- Quadratic probing, open addressing hash table.
commit 975c757ce17eb83f2e7357e78554b59f94963b85
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Nov 2 19:07:08 2011 +0800
Add llvm-lit for testing.
We use lit(LLVM Integrated Tester) for MCLinker testing.
Add basic config and some simple tests.
commit 1f9a62dfdc1907be35278f767bfa466f67153887
Author: luba <lubatang@gmail.com>
Date: Mon Oct 31 08:19:39 2011 +0800
Add MallocAllocator
LLVM has provided a llvm::MallocAllocator, but it is a 'plain' allocator.
That is, llvm::MallocAllocator returns a raw byte string and users need to
cast the raw byte string on a new type by itself. Additionally,
llvm::MallocAllocator does not follow the API defined in C++ standard.
So, I decide to give them a new MallocaAllocator.
commit 83c8f2bd7b417cee2f095ef28d2bf08bbbda82c3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 20:56:04 2011 +0800
Force RegionWriter to be used only through auto variables
commit 7ecaef28263a26caf73f49d6c624aefbeaeff3a5
Author: pete <petechou@gmail.com>
Date: Mon Nov 28 09:51:08 2011 +0800
HashTable
1. fine tune the probing performance
2. refine the erasing code
3. write testcases for "erase", "clear", and "tombstone"
commit 5cbc4f2546d046ec50e5930f7e6da4ae99201d32
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Nov 16 11:06:21 2011 +0800
Add comments
commit f783a732c31e44744863d60b0bf86c196320ebe1
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 15 11:37:01 2011 +0800
Add missing '<'
commit 49c8beabfacfdef9171a24e038a1bb0e243c628f
Author: luba <lubatang@gmail.com>
Date: Thu Nov 10 23:21:37 2011 +0800
write comments in HashTable::rehash()s
commit 1b3c38cd68808aa6ab9a4ac96d4e698105e6dc86
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 13:16:50 2011 +0800
Add testcase to make sure two MCRegionFragment::classof()s are correct.
commit f95de000888b22fb7af57d2053b53dd239f9ec16
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 13:11:36 2011 +0800
Add MCRegionFragment
MCRegionFragment is a kind of MCFragment which is used to represent the
section data when reading a object/DSO file.
commit b87c95aa31d90e7bec8834f715462a2a9cc5d0ca
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 13:00:16 2011 +0800
Add a some testcases for hash table.
1. a pressure test to insert 4000000 elements
2. test case for traversing chains of the hash table
commit 14cc34ee4583e807b0dd606c0ef0c68571bece14
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 12:59:20 2011 +0800
1. Change the HashTable from quadratic probing to linear probing.
2. Fix bugs in ChainIteratorBase
At first, we follow llvm, use quadratic probing. However, in llvm, the quadratic function is not real quadratic, it's a triangle function - K(K+1)/
ChainIteratorBase::advance behave wrong. It returned when meeting a empty bucket. It should ignore empty bucket.
commit 6307571e18535b25ee1b63987705762e056ade89
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 12:58:44 2011 +0800
Fix bugs in HashTable
Thanks for TDY, we resolve the bug - use the bucket reference that is deleted after rehash
commit 64c155a8bf7256bf8b35cb1c7a420e06c937995c
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 06:34:04 2011 +0800
fix a bug in HashTable::load_factor()
HashTable::load_factor() has typo error. Since it's a template class, typo-error is not easy to be found.
commit ede118612a71753ae4a1f990d0f7727534bb7067
Author: luba <lubatang@gmail.com>
Date: Wed Nov 9 06:09:56 2011 +0800
Add a new testcase - alloc100 - for HashTable
alloc100 sequentically inserts 100 elements into the HashTable
commit b6014605f72bdc76bdbd961cdc3ae67b62606a19
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 11:29:45 2011 +0800
Refactoring HashTable
1. make HashTable is no longer limited to llvm::StringRef key type.
HashTable get the type of key and value from HashEntry.
HashEntry::key_type and HashEntry::value_type. HashTable does not assume the key type is based on string. Moreover, the hash function is also not l
2. move the construction of HashEntry outside from the HashTable.
Clients must pass the factory of HashEntry as a template argument into the HashTable. That is,
HashTable<..., EntryFactory>
The memory can control by the factory. HashTable no longer takes care of it.
commit 12ef316a47a7d068a2593cb9510c829662149a73
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 10:59:53 2011 +0800
Unit test of mcld::HashTable
Only few cases are tested. Please contribute more cases.
commit 564228ab83535e7f60d043e6923bdb5f5c3ad6f5
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 10:55:34 2011 +0800
A HashTable whose hash function is changable
Since the hash function in linkers can be changed in GNU ld, MCLinker should
provide such feature to change the hash table. mcld::HashTable is the implementation.
Features:
- Can change hash table
- User defined hash entry - Symbol table uses this feature to keep string and symbol in the same cache line.
- Quadratic probing, open addressing hash table.
commit 84586bd7ed6e0023f3f661323f8f93140d72439d
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 10:48:44 2011 +0800
Add MallocAllocator
LLVM has provided a llvm::MallocAllocator, but it is a 'plain' allocator.
That is, llvm::MallocAllocator returns a raw byte string and users need to
cast the raw byte string on a new type by itself. Additionally,
llvm::MallocAllocator does not follow the API defined in C++ standard.
So, I decide to give them a new MallocaAllocator.
commit acc2c370db8c9c1d437bdbb87277f49152c31c53
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Nov 11 10:43:49 2011 +0800
add all string hash functions
string hash functions are partial specifized with the prototype:
template<size_t HASH_TYPE>
class StringHash : public std::unary_function<llvm::StringRef, size_t>
{ };
MCLinker provides the following hash functions:
enum StringHashType
{
RS,
JS,
PJW,
ELF,
BKDR,
SDBM,
DJB,
DEK,
BP,
FNV,
AP
};
commit 24a8d22a905e0995cfde8b196e3b8cc2f2ab10bd
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 14:48:14 2011 +0800
Re-add MCLDDriver scaffolding.
Use MCLDDriver as GNU collect2 to prepare
all implicit parameters for MCLinker.
commit c9812dd48671c83261c3ecc182d0d22e64376228
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:37:34 2011 +0800
Remove legacy code from MCELFObjectReader
commit 1df9138c88d3e76b3882e3ead7dced589ff29508
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:36:51 2011 +0800
Remove verbose printout from unittest.
commit 9e689583cea552c684483b61d8be1779ccc8c8ce
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:35:29 2011 +0800
Correct the copyright and license.
commit c143ee81e5d6e36321baabcfd57a96e05445bcdc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:33:20 2011 +0800
Change the description of MCLinker.
The main contribution of MCLinker is not BSD-like license.
Instead, is using LLVM machine code layer and perform well under limited memory budget.
commit 396917e17da3a9dcd64f01b9e91e622cdf0c750f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:30:51 2011 +0800
Fix Luba's email and the Copyright
commit a23025ae217cb5353826cbad6d9bbf3bc56616bf
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:30:00 2011 +0800
Remove directory check from the unit test "PathTest".
commit 1f9e256769b3b1c3a3ee6cdb083798a78fc40d0b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:28:51 2011 +0800
Change the old project name to MCLinker.
commit 405382710ebe8b2f88e0415cd5d8d4275068c902
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Nov 1 10:27:10 2011 +0800
Add LLVM release license file.
commit 0f5fb0b15f353e777c9d5734b79cf92db632fb27
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Oct 27 13:46:59 2011 +0800
Replace get_current_dir_name() with getcwd()
get_current_dir_name() is not portable in Unix-like systems
commit f07dc273f036e1fd1f7616275ff52d065a02378b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Oct 27 13:40:34 2011 +0800
Refine MemoryAreaTest
Remove redundant tests, and change file names of sample files
commit 8e67d2da40c2bb2daaea12bf20161415a44c26d5
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Oct 26 17:00:11 2011 +0800
./patch/LLVM.patch is for LLVM 3.0 branch, not trunk.
commit b634a59912a1d40ccf99bed32869dc715f0c997e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Oct 26 12:47:26 2011 +0800
Add ELFEXEWriter header and footer
commit 4ea0616604456788c2e1a7b940f6e584606df707
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Oct 26 12:46:17 2011 +0800
Move LDScriptReader directory to lib/LD
commit 6cff6d7e074a781a957464d28f3a7c3fc7d7a8a9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Oct 26 11:04:49 2011 +0800
Remove temporary code of Readers
commit 43a592f296c6af10e6b4af34b18332d1618408fd
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Oct 25 17:35:38 2011 +0800
Write comments for a number of files
commit 31abc0988cbfd69fca49d8c863004d90de9c9365
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Oct 25 14:23:17 2011 +0800
Remove ObjectWriter and ObjectTargetWriter
Use LDDSOWriter and LDEXEWriter instead
commit a0befa4577e50f6b225a534a1fa885d7d7834612
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Oct 25 10:55:33 2011 +0800
Rename MCLDDriver to MCLinker, remove old MCLinker
commit bb8c5250771fe50d33ec6cfc6145f361d510cd8d
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Oct 24 19:53:35 2011 +0800
Tidy up ./patch directory
commit 465bd9fd412465e87c792a0873fe8ee463930f51
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Oct 24 19:34:32 2011 +0800
Add missing header files
commit 7e9713b1928848551bae4dbea336bcd17f9a6555
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Oct 24 12:59:18 2011 +0800
Remove include<cerrno>
commit 52418fcb55b764caa163d82ce8f7974a8b9091d5
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Oct 24 12:53:11 2011 +0800
Remove redundant include<iostream>
commit d935db745b93ae175ae10ce8b75e55c366ca5ad9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Oct 24 11:48:25 2011 +0800
Fix warning about "NULL used in arithmetic"
commit eea7f316e094e5236f396e974c0c3a52250bb1c1
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 21:01:29 2011 +0800
Force RegionWriter to be used only through auto variables
commit bbb2780e8a078b5cea8391b27be48007dffadcc6
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 17:01:15 2011 +0800
Move MC/MCLDContext to LD/LDContext
commit eab6d7efb73f44d1776001e56634e2d53205685e
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 16:30:40 2011 +0800
Rearrange some code
commit 4c20d4b12dd120ebc820ab385db2571102bfdc2c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 15:47:46 2011 +0800
Add namespace missing "std::" prefix
commit 576147414854bf04a6c1cea8861ecc56029409e1
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 15:45:12 2011 +0800
Remove unnecessary forward declaration
commit df74078521e645b6fbf97c0e22ab9174e4967980
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Sun Oct 23 15:32:40 2011 +0800
Avoid building MCLinker in source directory for the case without specifying "--unittest"
commit f7aa1d3a2ede9b40451277ed077098a36c419d71
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Oct 21 22:14:09 2011 +0800
Remove "#include <iostream>" and rearrange include order
commit 766081a84d93013bb1c5ca28c3370706cbaa9da7
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 20:03:51 2011 +0800
Changes to fit LLVM Release 3.0
1. generate the diff for llvm 3.0 based on r142614
2. made the corresponding changes about TargetRegistry and TargetSelect
commit 3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3
Author: Evan Cheng <evan.cheng@apple.com>
Date: Wed Aug 24 18:08:43 2011 +0000
Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
3. remove the code for llvm 2.9
commit e3502d9411bab32ddf06accd4ccaff231e2b38e0
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 17:51:07 2011 +0800
Style: Avoid std::endl
commit 059dc0551fa92e068dd145189b377c502784d9f6
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 17:36:08 2011 +0800
Style: Do not use 'using namespace std'
commit e40a57cc29ea1ca3ff835920c30c5279bd85f471
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 17:24:38 2011 +0800
Style: more license fixes
commit e645c3e0e22f92e8a924536b1aa98f2386832aae
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 17:20:32 2011 +0800
extend the AUTHORS list
commit 73d9e668f734c43fa44ec3e214b1321c1781e56f
Author: pete <petechou@gmail.com>
Date: Fri Oct 21 16:35:59 2011 +0800
Style: Modify the license and include style to fit llvm style
commit ddece1991a5d370d80ca2de31f8fcb64197b695c
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Oct 21 11:32:08 2011 +0800
Rename the standalone tool
commit 83e08ed9788ee0f2a0c896ff3a5f77888dc33946
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Oct 21 10:57:56 2011 +0800
Modify build script, avoid building in source directory
commit f8dfc828bb7d75714a7a07335b7a1da184c5b248
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Oct 20 19:27:43 2011 +0800
Remove two folder "./src" and "./debug"
Move MCLinker main to tools/llvm-mcld
commit 3e78adc440d54a544a040ba2e83e76d8f117f6e5
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Oct 12 08:14:17 2011 +0800
Code clean up.
commit ebee2cfab18ce62a6f20e0a09a9acc89af6dad33
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 11 21:08:16 2011 +0800
Implement shouldOverride.
commit 8c3cf01465d6fb013dd933825a60cf03ea2952a3
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 11 16:14:24 2011 +0800
Overwrite -> Override.
commit 11a4e5d15095bfb35150aa02685f78d1c92fb118
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Oct 6 10:07:34 2011 +0800
Add checks before RegionWriter writes buffer
commit 8e70d908ba564cee4d3373ed2d167a01b364c888
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Oct 5 20:09:43 2011 +0800
Add LDWriter scaffolding
commit 3d16c37f6a0078a9e48e839529d55740865dfd4e
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 19:43:37 2011 +0800
Change some fatal failure to nonfatal.
commit 474175b9230dee039a1128d19417055cfcbb5ab6
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 17:14:17 2011 +0800
Add more StrSymPool tests.
commit 60858969b65dbeaac3b6eae2a85522eda133ba0b
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Oct 4 14:00:04 2011 +0800
Add unittest for StringTable.
commit 4b904a594ca281419ae15d3250d8151815c7c243
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 13:55:57 2011 +0800
Resolver pass by value.
commit 32f6b6c9dace7546281c7d814a740dad6657f67f
Merge: 041c1c2 da5dd9e
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 12:24:32 2011 +0800
Merge remote-tracking branch 'origin/master' into symbol-table
commit 041c1c2f45e24cfdb453c743c7e14abed230f7cc
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 12:23:49 2011 +0800
Add StrSymPool unittest.
commit da5dd9ee45bfabd425c68e73722997e58e4d1132
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Oct 4 11:39:57 2011 +0800
Fix StringTable.
Move StringTableIF to StringTable.
Cleanup useless unittest.
commit bfd56054fb52fe4a54a03f506dac4759fb82c691
Merge: dc62dd8 ce06c6b
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 10:19:07 2011 +0800
Merge branch 'origin/master' into symbol-table
Remove SymbolStorage.
SymbolTableFactory finished.
commit dc62dd8e6339a08a1d838d753e287fc8a763234f
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Oct 4 09:19:25 2011 +0800
Fix SymbolTableFactory.
commit ce06c6bfc0d300ee120b9ebd9df05eb5b7ed67cd
Author: luba <lubatang@gmail.com>
Date: Mon Oct 3 11:52:14 2011 +0800
Add SymbolStorage under ${MCLinker}/LD
This is an early prototype of SymbolStrage. Some trivial bugs may occur.
commit 77cd06378472bdd63752a52578085f077804892f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Sep 30 17:31:32 2011 +0800
Add the definition of LDSection
LDSection represents a section header entry
It is a unified abstraction for various file format
commit b756bffdf5061043605a1390818d9a59c089fff8
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 29 23:56:15 2011 +0800
Fix SymbolTableFactory.
commit c364b0b6530c4de753d74f18af0ec3d5b51ef77d
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 20:01:42 2011 +0800
Add default value for "Value", "Size", and "Other"
commit 28dbc8c229439eea98564ab31d0238d914dd9e83
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 19:48:24 2011 +0800
Sorry for such a large commit again.
Fix typo: Catagory to Category.
Implement SymbolCategory::interpose.
Move out CategorySet from StrSymPool.
Fix compilation of StringTableIF.
Add "Value", "Size", and "Other" argument to insertSymbol.
Add LDSymbol's private copy constructor and operator assign.
commit 3bb98f27f042923a5fbe80e605a630e817fdbd49
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Sep 28 19:51:15 2011 +0800
Add the testing file for MemoryArea unittest
commit 7b26b4902ad6c91eb62453398865f86df02e4ebc
Author: Diana Chen <diana.chen@mediatek.com>
Date: Wed Sep 28 14:28:08 2011 +0800
Add testcases for MemoryArea
commit 22adaeac58590b2230b0c8a606ef64a9a14bac15
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 13:29:06 2011 +0800
Implement that move symbol to other catagory.
commit 83c50ded317a100f12ac3c543ad60d38e852f75b
Merge: 9de22cd 74e9046
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 11:50:57 2011 +0800
Merge remote-tracking branch 'origin/master' into symbol-table
Merge StrSymPool and Resolver.
commit 9de22cdadb8f5ec9fa83f82b144398be0c788e26
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 11:48:04 2011 +0800
Sorry for such a large commit again.
We use StrSymPool instead of SymbolStorage and StringStorage.
commit d6e65d9b7cc20b22465245a61dd25c771cdbdc26
Merge: a2a4cd7 7c3b4df
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 28 10:44:18 2011 +0800
Merge branch 'origin/master' into symbol-table
commit 74e904670ef790ba4425acb9f206effb0ca4c6e0
Author: luba <lubatang@gmail.com>
Date: Wed Sep 28 11:41:53 2011 +0800
1. add forward declaration of LDSymbol in Resolver's header file.
2. add the including of LDSymbol's header in Resolver's implemenation file.
commit 1128fcfc51ef86d0ad8a9b02681fd773fbe59f9b
Author: luba <lubatang@gmail.com>
Date: Wed Sep 28 11:31:21 2011 +0800
Add mcld::Resolver to bind symbols.
mcld::Resolver is the object who processes symbol resolution.
commit 7c3b4dfc4f862fe68e2b9c6f9d6ab3fff75eee40
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Sep 27 17:52:46 2011 +0800
Implement the function of StringTable.
commit 3155131f8487f311818e82248f2270238463dfbe
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Sep 27 16:25:08 2011 +0800
Fix the architecture of StringTable.
commit 8cbc92b8b84f843ee1c49219cea6e351a1ad1440
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Sep 27 10:18:11 2011 +0800
Fix twice increment.
commit 51a8cfccfa09a9775060c2b4e1608629259267ce
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Sep 27 09:57:19 2011 +0800
Move StringTableStorage to StringStorage.
Change StringStorage API, without changing usage.
commit 2713fd1c933554a508f29f7e1556d3f3d0191db3
Author: luba <lubatang@gmail.com>
Date: Mon Sep 26 03:51:51 2011 +0800
1. MemoryArea can write back to the mapped file
2. Finish memory mapped I/O parts of MemoryArea
commit a2a4cd7cfa145a7a58773b01e087f835b94e3a5b
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Sep 20 20:27:40 2011 +0800
Sorry for such a large commit.
Add all symbol table relative source code to Makefile.
Compile success, we need some unittests.
Add three symbol list: Entire, Dynamic, Common.
We cache the specify type symbols, then we can traverse more easy.
Remove SymbolTableFactory's template.
We only use singleton on any cases.
Move some small function from cpp file to header file.
For "inline".
Move SymbolList to SymbolStorage.
Let class dependency become a DAG.
Use reference instead of pointer when it can't be null.
Add "rebind" to LinearAllocator.
Obey the C++ Standard. For StringUnorderedMap using.
commit 8dd4676cb9dafb7f706be42145ee96260e99eecf
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Sep 20 14:30:25 2011 +0800
Move SymbolList decl to SymbolTableIF.
commit ab9bc330ea702b4fd01e8fbf8b6b00b9efc7466e
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Sep 20 13:08:50 2011 +0800
Implement SymbolStorage.
Change LDSymbol's friend from SymbolTableEntry to SymbolStorage.
Add SymbolStorage and SymbolTableEntry to Makefile.
commit c258dfe219d00f9aa29406af6e72922489c3b9a5
Author: TDYa127 <a127a127@gmail.com>
Date: Tue Sep 20 11:20:05 2011 +0800
Modify StringUnorderedMap functor and allocator.
For empty base class optimization.
commit f4010b6d6b0a5eb15c766799daa78a170348f913
Author: Nowar Gu <nowar100@gmail.com>
Date: Fri Sep 16 22:13:22 2011 +0800
Fix StringTable unittest bug.
commit 4fb28d22ee9b8678a04a91a945ea6c151ee71548
Author: luba <lubatang@gmail.com>
Date: Fri Sep 16 18:12:30 2011 +0800
1. add readSymbolTables() and mergeSymbolTables() in MCLDDriver.
2. remove obsolete class SymbolTable
commit f8b323d1e834b8beac3c21634e3545f3610d4ce8
Author: luba <lubatang@gmail.com>
Date: Fri Sep 16 18:08:14 2011 +0800
Review SymbolTableIF
1. Fix a but - the last embrace of class SymbolTableIF is not followed with ';'
2. Add comments
3. change the name merge_impl() and insertSymbol_impl() to doMerge() and doInsertSymbol()
4. let getSymbol as a observer - return const LDSymbol*
5. add a new modifier getSymbol() - returns non-constant LDSymbol*
commit 641d648470b231c49fb6e8a2bb1bd3895b70ddcc
Merge: 61a2476 106f9c3
Author: Nowar Gu <nowar100@gmail.com>
Date: Fri Sep 16 16:28:50 2011 +0800
Merge remote branch 'origin/master' into HEAD
Conflicts:
debug/Makefile.am
commit 106f9c304e96625fa8b762a24fdd8b2e8a0abefe
Author: luba <lubatang@gmail.com>
Date: Fri Sep 16 15:51:47 2011 +0800
add --add-needed/--no-add-needed attributes
MCLinker needs to double confirm if it is allowed not to copy the DT_NEED of input files when
checking the dependencies of dynamic libraries.
commit 61a247653b9d748dd9f29eb40acef06695a178af
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 15 23:33:19 2011 +0800
Add SymbolTableEntry usage to SymbolStorage.
commit cef15fdcc1178658abafda99b14b9ea8773f637b
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 15 23:31:28 2011 +0800
Add SymbolTableEntry.
commit 637f5ed17d6e51ca63bd11ce9c6fb2920a36167b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Sep 15 20:53:25 2011 +0800
Add a unittest for MemoryArea
commit 8828be501730baf80cbf675323cfa8742b879dd6
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 20:27:30 2011 +0800
Finish LDSymbol and move SymbolTableTest out of unittest
Because SymbolTable has not finished yet, and it conflicts with current LDSymbol,
I move it out of the compilation list.
commit ec89c687a517e8b24c38b3b3f29fe8b5eb1f214c
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 19:55:02 2011 +0800
Fix a bug - MemoryArea::isGood() returns the opposite value.
commit 7b40a5172acb2ce2f307699b61082ab37d0cdf3f
Merge: bce4c35 43e7101
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 15 18:08:22 2011 +0800
Merge remote branch 'origin/symbol-table' into nowar
commit 596d478524ec9afc462aa323b4c23e7cb6209e6d
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 16:18:32 2011 +0800
Finish the implementation of MemoryArea.
I have not implemented memory mapped I/O parts of MemoryArea.
Because when we link in Android platform, linkers load few sections of input files.
And memory performance is not a critical issue under such scenario.
commit 67f7ab10981ef3721800d47b3ac8152ea42ab2a5
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 16:17:26 2011 +0800
Fix a typo error - Allocator::isAvailable()
commit 70b53f382c158a50c8931eb772e92535e45a8ee6
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 14:51:11 2011 +0800
MemoryArea::request add a new case: if we find an existing space.
commit 001cd1479c9d0b2ff4c0965e7412ab9bcf40b379
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 14:05:57 2011 +0800
Let MemoryAreaFactory create MemoryRegion by RegionFactory.
commit 94d8c0040a9d6238197a6b0a6f263d46d8df48f8
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 14:05:35 2011 +0800
add RegionFactory to manage all MemoryRegion.
commit f007e2bb769933593d4d2aea78e78e41f0037a18
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 14:00:49 2011 +0800
add an empty testcase of MemoryAreaTest
commit cdd634ba7dc67514b63aae56127f11e14ac20ce5
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 11:10:46 2011 +0800
Finish the scaffolding of MemoryArea and implementation of MemoryArea::request
commit c2c5540083f281eaff49e1d0980dc5186f7dfbee
Author: luba <lubatang@gmail.com>
Date: Thu Sep 15 11:09:23 2011 +0800
Let the implementation source of unittest searches in the local directory first.
commit bce4c358e6a402585fbdf619d777f75efc047f7a
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 15 10:23:13 2011 +0800
Fix memory leak on string table.
commit 3618c931ceb0d633ec2d842682c5fd77c1ba6d99
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 15 09:57:10 2011 +0800
Fix null-terminated string size bug.
commit 43e7101747b1f9c193a44fbd7fe07cb112125fb1
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 18:23:27 2011 +0800
Fix StringUnorderedMap StringType.
commit f2f18f7eef077ed67618d8b1414e0eb4c8eb44fb
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 17:28:00 2011 +0800
Fix SymbolTableFactory singleton.
commit 81845fad57b14465791c392333c6c4adc8e7f367
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 17:00:48 2011 +0800
StringUnorderedMap: clear() & destructor.
commit 3f91c8eefdf3d0e9007f32b2dd0031b76fbd6eb2
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 16:42:29 2011 +0800
Add StringUnorderedMapTest.
commit 67505dc6fc7a281adbba5089293270ca87d196f2
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 14:16:00 2011 +0800
StringUnorderedMap is close to finish.
commit 4ca681b2db8bf4a0b881924fe57fab357b65e3ca
Merge: 0d78df2 239064e
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 10:53:22 2011 +0800
Merge 'origin/a127-tmp' into symbol-table.
Merge our StringUnorderedMap.
Conflicts:
include/mcld/LD/StringTable.h
commit 0d78df23fb8f6308fea9d43b81668ee687d6c76c
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 14 10:48:23 2011 +0800
Use StringTableIF rather then StringTable.
commit 7a378374448df0265c57cb3253d79d09e48a089f
Author: luba <lubatang@gmail.com>
Date: Tue Sep 13 15:25:59 2011 +0800
All mcld::MCLDFile gets its MemoryArea.
commit 45c920eab8f6adfa1e14242eafde9ec5c6dfb752
Author: luba <lubatang@gmail.com>
Date: Tue Sep 13 15:16:53 2011 +0800
add MemoryAreaFactory in MCLDInfo.
The architect decides let MCLDInfo carries MemoryAreaFactory to everywhere.
It may be a stupid decision. If it's stupid, please tell Luba gentely.
commit cfd9de20f114265e371a2f65fdb759c72a4a1ff5
Author: luba <lubatang@gmail.com>
Date: Tue Sep 13 14:54:49 2011 +0800
add new class MemoryAreaFactory
MCLinker should let two different inputs with identical file path share
the same MemoryArea. So, like ContextFactory does, we provides a new
factory to do that.
commit 2a43699955b158a36126736fd4a0591e8c49f466
Author: luba <lubatang@gmail.com>
Date: Tue Sep 13 12:03:49 2011 +0800
Add UniqueGCFactoryBase.
Because we have more and more request for an associative factories which
has unique key and value pair, for example ContextFactory and
MemoryAreaFactory, therefore, I create a class UniqueGCFactoryBase for
the common parts of these factories.
commit ea30a3a7b79db9cb8940a0a8c239141bd13367c9
Author: luba <lubatang@gmail.com>
Date: Tue Sep 13 12:01:45 2011 +0800
envsetup.sh determines if the user is on SWRD server stg01 and add git commands in the searching path.
commit ce0ea9786d7e03e7efc091a43d356c4f99b8e06e
Merge: 2e3d040 4ae7094
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 8 18:56:48 2011 +0800
Merge remote-tracking branch 'origin/symbol-table' into nowar
commit 4ae7094eba1c2296b3e0b057a6eedff4d6a46e8b
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 18:53:49 2011 +0800
Add SymbolStorage's some code.
commit 2e3d040969f804665d4f3c6177457827445e82cd
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 8 18:49:46 2011 +0800
Add StringTable, DynStrTable, and unittest.
commit f35dbb5fea04d1166a5b193873f686cf3dbe661c
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 17:58:00 2011 +0800
Reserve SymbolList size when construct.
commit 808a7b1e5c91916e8c81a86faf9d6597b565e279
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 17:30:28 2011 +0800
Remove LD prefix.
commit 878e229732e29e65bb3527b7152039b9d8aec905
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 17:26:39 2011 +0800
Remove LD prefix.
commit d58566b0bd8f7f77491cd983c4fdb34a84d75816
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 8 17:14:15 2011 +0800
Code cleanup. Remove LD prefix and old StringTable.
commit d23795114d9a4f215f14316e013a9f039a9ad128
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 8 16:54:46 2011 +0800
Add scaffolding of StringTableFactory.
commit 58db1a9e2fbe7fc7f826e6c04f741d0bffb90851
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 16:52:24 2011 +0800
Add LDSymbolTableStorage draft.
commit 8b1ba35c2f4b9ebf0bfa09dc9fb8d7abf1259f1c
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Sep 8 16:51:39 2011 +0800
Add scaffolding of StringTableStorage and StringTableInterface.
commit 337f6adeba144944e49ef83489f560506f099ad6
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 13:43:36 2011 +0800
Fix LDSymbolTable initialization.
commit 75a7945082edf34aee1f26af01c7673f8c75f7ea
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 13:31:46 2011 +0800
Implement constructor and distructor.
commit 0c981e9f50f727da824015d3a5d8856dd59df8c0
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 12:28:57 2011 +0800
Remove LDDirectSymbolTable and LDIOSymbolTableIF.
Now:
LDSymbolTable
/\
/__\
|
--------------------------
| |
LDInputSymbolTable LDOutputSymbolTable
commit b47ffc09d2b70c3c8c5f8156ecc2da6ffe26c955
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 10:25:08 2011 +0800
Remove unwanted typename.
commit 3e545b352c7b63b950125000800bdfa9f47384c0
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 10:04:21 2011 +0800
Move virtual member to private.
Use NVI pattern let the iterator operation can be hidden by derived class.
Then the iterator operation can be fast when know the type.
commit f2b687ba31b5662427b85cc4aa35a0044edb4c45
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 08:15:15 2011 +0800
Impl Input and Output SymbolTable::insertSymbol.
commit 215ed62dd6d0ac5b729d30050749557d9f90d1ee
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 08:04:50 2011 +0800
Add MCLDOutput.h include.
commit 841774e4cc04573cd845c426842bb5aaa95cf24c
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 8 07:54:36 2011 +0800
Interface changes. Implement DirectSymbolTable.
Move iterator relative interface to lower level interface.
Implement DirectSymbolTable.
commit 8ee8cf8b610cbeb07bef36685e5f48be0008ebae
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 23:09:55 2011 +0800
Add LDSymbolTableFactory<true> draft.
commit d176b5138db7f5096b0bab3ce2b2d1031521d1e2
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 22:38:02 2011 +0800
LDSymbolTableFactory is LDSymbolTables' friend.
commit a769c14a1cb7f313bfb2420305a06e5c0729520e
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 22:20:31 2011 +0800
Add draft note.
commit 47eab80a93cddba2ae838d28ba13f24b6d6f59a2
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 22:15:48 2011 +0800
Add symbol table factory draft.
commit e7e916941a99b27eca092493792eac757ff68ee0
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 21:59:48 2011 +0800
Fix typo: talbe -> table...
commit a8300f3914b371e62a350fb2b8aec82d1b5bafaa
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 21:43:24 2011 +0800
Add direct symbol table draft.
commit a932f98a838a65fe7ccec131859e170384d6cf4c
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 21:40:19 2011 +0800
Add LDOutputSymbolTable.h include.
commit 99543babb6db39bcaa4259344ba9056e6bf7f1ae
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 21:21:19 2011 +0800
Add Output symbol table draft.
commit 1bbecf1d27db4cf2e2afd4333a19d53bffa9bfce
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 20:39:43 2011 +0800
Add input symbol table draft.
commit 871ca4c0b31a20126a839d08a5bc45f2a984cbf1
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 20:31:28 2011 +0800
Add IO symbol table interface draft.
commit 8cab6036f0afaddc22e49c169ecf68116c5cf344
Author: TDYa127 <a127a127@gmail.com>
Date: Wed Sep 7 20:23:28 2011 +0800
Add Symbol table interface draft.
commit d7895e40690b87418f14cb84fa13b9756e120308
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Sep 7 10:15:48 2011 +0800
Add FIXME to unittests for "DirIteratorTest"
Some bugs modifies the global value "errno" to non-zero.
This makes readir() failed when daily build system runs unittest
Remove the FIXME after fixing those bugs
This unittest fails only when running unittests by daily build system
commit 239064e6d8f23558ad5ecc1cf59e6088c14062e5
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Sep 1 19:14:01 2011 +0800
Add StringUnorderedMap draft(not complete).
commit 3d65138fdfdab0b994888aee195a9135f73e7429
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 31 08:04:46 2011 +0800
Add some missing unittest of StringMap.
commit fe7ff2a94c9fd787f9fa0f7b3c6f399eb7e324af
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 31 07:47:19 2011 +0800
Add SymbolTable, LDSymbol and corresponding unittest.
commit 3e67358487dd0ff11ae97571eca2ee1bb719e27f
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 30 13:43:26 2011 +0800
Add StringTable and corresponding unittest.
commit 4bbe75fe3202a731b303ef0dd38d8dd77b9a0308
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 30 11:17:09 2011 +0800
Improve StringMap unittest. Replace tab by 2 space.
commit a893afcb5bf673e5703614796101949ce248bce2
Author: luba <lubatang@gmail.com>
Date: Tue Aug 30 16:10:06 2011 +0800
Let MCLDFile get MemoryArea.
MemoryArea is the manager of memory map I/O and allocated memory array for files.
MCLDFile uses MemoryArea to get memory regions.
commit 66a232e3cdf4a22ed4094b126f9c579c7bcae354
Author: luba <lubatang@gmail.com>
Date: Tue Aug 30 16:09:09 2011 +0800
add the scaffolding of MemoryArea and MemoryRegion.
commit af909522fe4369afda1f3aa111b3c297537f2442
Author: luba <lubatang@gmail.com>
Date: Tue Aug 30 14:05:36 2011 +0800
The result of unittest BFS_BasicTraversal was wrong, fixed it.
Root
/
111
/ \
9 10
/ \
7 8
ROL, the result should be 111, 10, 9, 8, 7
commit a8e920dcb2bc8e6f7361b967e3f696aaa343257d
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 30 09:54:16 2011 +0800
Add features into scripts.
commit e11caa50c0486246788a0f43b05c1a326d7e8675
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Aug 29 20:35:15 2011 +0800
Adding a header file for std::cerr
commit 24e84578d7aa5f30c6f13693778d9d75d3c3296e
Author: luba <lubatang@gmail.com>
Date: Mon Aug 29 20:21:56 2011 +0800
Add a Config.h.in
autoconf reads Config.h.in and generage Config.h
Some target-independent information about MCLinker are in.
commit c2224729a2907edf6753c7fcc77294926d25a5cd
Author: luba <lubatang@gmail.com>
Date: Mon Aug 29 20:21:13 2011 +0800
add unittest for StringMap
commit 1d11a78bc8608da1dd46b6a1553bdc98533e113a
Author: luba <lubatang@gmail.com>
Date: Mon Aug 29 20:19:16 2011 +0800
add X86 target in compilation.
commit c15f0c015fe65831f63e307a399fdeefaadee0fb
Author: luba <lubatang@gmail.com>
Date: Mon Aug 29 20:18:53 2011 +0800
add X86 target
commit dd067673e230d69f1bd2b4c98c6d9bfd236273cf
Author: luba <lubatang@gmail.com>
Date: Mon Aug 29 19:53:46 2011 +0800
Fix bugs
1. StringMap's constructor set value to parameter, not member variable
2. cur_node in SectLinker initializeInputTree does not move forward correctly.
3. refine BFSIterator algorithm
commit 4accb839a02ea302b9dcdd72cc77f56e89421fa2
Author: luba <lubatang@gmail.com>
Date: Sat Aug 27 16:59:05 2011 +0800
VERSION - The document of software versioning.
commit b66e4d97bbd3d4c9d72f7eafb2ae70fb16457a09
Author: luba <lubatang@gmail.com>
Date: Fri Aug 26 18:13:09 2011 +0800
add option -V and -verbose for demo.
commit 9051b6f3de4fff555dc1860bded747b601e80e5e
Author: luba <lubatang@gmail.com>
Date: Fri Aug 26 17:46:12 2011 +0800
LLVM 3.0svn removes IsSymbolRefDifferenceFullyResolvedImpl from target writers.
Since LLVM 3.0svn let MCObjectWriter finish the jobs of IsSymbolRefDifferenceFullyResolvedImpl,
we do not need to expose this function in MCAsmObjectReader any more.
This patch also fixes the bug - an unexpected assert in ARMObjectReader::getRelocInner().
commit 89bc3b6d8513a8f7da6ddb0b5e2305fb69dc0335
Author: luba <lubatang@gmail.com>
Date: Fri Aug 26 11:26:51 2011 +0800
This patch is by Wen-Han Gu - Add the Relocation class.
BTW, PLEASE make sure EVERY COMMIT can be COMPILED!!
commit 1f9c0c5c10fd6de0154712b365126d901800eeb9
Author: luba <lubatang@gmail.com>
Date: Fri Aug 26 10:57:11 2011 +0800
LinearAllocator doesn't mean to release memory at destruction.
By the C++ standard, allocator is just an abstruction of underlying memory.
It should not refer to the area of garbage collection, even memory stack.
Please ask the author written in the header before you starting modifing code.
commit 786c71c9255a2d55de3b2b47406583e712c7f80d
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 25 18:59:07 2011 +0800
Improve MCAsmObjectReader::RecordRelocation().
commit 8fa8a35f3b7a44aded948651d8c793768798f7bd
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 25 17:12:09 2011 +0800
Move RelocationInfo from MC to LD.
commit a3cbae418e766aca4c0c495ca59e8a683ed06746
Author: luba <lubatang@gmail.com>
Date: Thu Aug 25 11:43:29 2011 +0800
enhance -t output
Display the name of a object file when -t enabled.
commit b2d9280de1d8632dc50f4ed666adb708b3f98ccd
Author: TDYa127 <a127a127@gmail.com>
Date: Thu Aug 25 13:21:37 2011 +0800
Add LD/StringTable draft.
commit 59bb714dc3561b6aa6b058cf6df14eadd0891fdd
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 25 10:24:16 2011 +0800
Let objects in StringMap live consistently.
commit 09371704bdc653fbe14141828aa87d42a8349746
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 24 21:17:50 2011 +0800
Keep valgrind leak-check silent.
Call clear() in destructor of LinearAllocator.
commit c2e92a3b1b06400b04ef0ab1feba2ea882317171
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 24 20:31:35 2011 +0800
Fix memory leak in unittest.
commit 5c0d0906951cf4bf20394fe08269426d2102c75b
Author: luba <lubatang@gmail.com>
Date: Wed Aug 24 17:57:27 2011 +0800
fix a bug in AttributeProxy.
Bug: AttributeProxy::isStatic() check the wrong condition of AttributeConstraint.
commit fe21a3652b594834475eecc22ea0eea7c8943327
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 24 15:26:58 2011 +0800
Implement our mcld::StringMap.
An object adaptor of llvm::StringMap to make it
- While insert, only find once, and we can get the iterator to the Value
- Stable iterator
Thanks for TDYa127!
commit 8ffed91cbd22b31dc9264da31bff829550e6b9a8
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Aug 24 13:38:29 2011 +0800
Adding type identification for -dy & -static
commit f92a911524478c09bc2108f590bcc378cce5addc
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Aug 24 09:34:30 2011 +0800
Adding missing header files
commit c11ee37e58a36af6531d10670c3787221c8f097b
Author: luba <lubatang@gmail.com>
Date: Wed Aug 24 02:33:51 2011 +0800
Fisrt stable version of normalization.
Bugs List:
1. ArchiveReader can not read members correctly
commit a22efb5ebe91b7bd8e3e887991f4e4bf24c9ca17
Author: luba <lubatang@gmail.com>
Date: Wed Aug 24 00:21:41 2011 +0800
MCLDDirectory should not be opened if in sysroot.
commit 2ecc851588c4a7c350b16e9bea113618152a93cf
Author: luba <lubatang@gmail.com>
Date: Tue Aug 23 22:53:51 2011 +0800
Fix the bugs in Path library
canoncal_form is wrong in some cases.
For example - '//' should not be entirely removed. There should be existing a '/'.
Another case is '/.kde.local/../', the result of old conocal_form is 'kde.local/../'
the correct result should be '/'
commit edc85d4ad21f741ca033ebb39afbffd99f4c890c
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 23 14:06:32 2011 +0800
Never use the space having been freed.
RehashTable() of llvm::StringMap *MIGHT* delete the table.
That cause us has SIGSEGV sometimes.
Now this is bug-free, but less efficient.
When inserting, lookup happens twice.
I'm thinking maybe I should re-design a mcld::StringMap.
commit 928641b775aca69db87fa157dc8e68a0f40e9a2c
Author: luba <lubatang@gmail.com>
Date: Tue Aug 23 11:42:19 2011 +0800
Add function - RealPath& RealPath::assign(const Path& pPath)
Since RealPath has default constructor and copy constructor, it should have an assign function.
commit b50a378d67448f76972456d9551a7b6111b259e3
Author: luba <lubatang@gmail.com>
Date: Tue Aug 23 11:26:55 2011 +0800
move SearchDirs under MC
Since SearchDirs is customized for linking, not a normal case for all searchable directories,
we move it from ADT to MC.
commit 376368af3711f813cc0ba54415c0692ae3148af4
Author: luba <lubatang@gmail.com>
Date: Mon Aug 22 19:39:52 2011 +0800
add regression test - trace
commit b5b9033a2acadb2c635c100f65994b6cdcf9a06e
Author: Nowar Gu <nowar100@gmail.com>
Date: Mon Aug 22 19:19:53 2011 +0800
Follow the default template parameter.
commit c26fcc7b036e977ef6008090d6c3d951ef3de49d
Author: luba <lubatang@gmail.com>
Date: Mon Aug 22 19:02:24 2011 +0800
Fix the bug - IteratorBase should have a default constructor
DFSIterator's constructor needs the access its left child and right child.
However, in the default constructor of IteratorBase, both left and right children are NULL.
For avoid dereference NULL pointers, I create a new default constructor of DFSIterator that does not pre-read the left and right children.
commit 0c6bed4492fca5ac3d89c1786ee4f29f6ba15e9b
Author: Nowar Gu <nowar100@gmail.com>
Date: Mon Aug 22 18:06:14 2011 +0800
Make a partial-specialization of llvm::StringMap.
We need a more-suitable-interface one when template parameter
is our mcld::Path.
commit 53933ce899edbed2ecbf2af8e310e9839d32a25c
Author: luba <lubatang@gmail.com>
Date: Mon Aug 22 17:11:07 2011 +0800
Fix the bugs in BFS iterators.
Pin-Roung is so stupid.
commit c645a0c678857a4f36340a33d9e183627325eda3
Author: luba <lubatang@gmail.com>
Date: Mon Aug 22 16:58:48 2011 +0800
Fix the bug of DFS Iterator
Pin-Roung is stupid.
commit 9cb394d2be904f26f00f75f7d430151d687615d9
Author: luba <lubatang@gmail.com>
Date: Mon Aug 22 14:44:23 2011 +0800
Bug free but bad performance Directory
This version of Directory needs two StringMap::find
commit 93d8305872a5eaf08bf30b9648f4f19a8007e215
Author: luba <lubatang@gmail.com>
Date: Sun Aug 21 22:25:33 2011 +0800
Fix a bug - read an entry in the directory immediately after opening a directory.
commit 87a1bfeb89dd3675fdba264c8452d237c0e5d0a9
Author: luba <lubatang@gmail.com>
Date: Fri Aug 19 14:33:36 2011 +0800
add some diagnostic code in MCELFObjectReader::isMyFormat
commit 8cede7eeda6bf4798f11339f1c82db4f7bb0bb63
Author: luba <lubatang@gmail.com>
Date: Fri Aug 19 14:08:41 2011 +0800
Change the PositonDependentOptions
Since LLVM removes the data of cl::list<Data> when it leaves scope.
We let PositionDependentOption stores the data.
commit 5d2db3f9fb2355556cd8eb9523621c3bb8401ad0
Author: luba <lubatang@gmail.com>
Date: Fri Aug 19 13:50:40 2011 +0800
Release AsmStreamer in the wrong time.
commit 5a6100474a49ac801c9ebc5abc8caca928c4e88f
Author: csmon7507 <csmon7507@gmail.com>
Date: Fri Aug 19 13:25:01 2011 +0800
First compile-able release for 8/11's scope.
!!WARNING!! This version is not debugged.
commit f991492dfba6de66c720270fccdbb9c7e0692f19
Author: luba <lubatang@gmail.com>
Date: Mon Aug 8 20:37:20 2011 +0800
Cancel the target-dependent archive reader.
Since the difference of the formats of archive files are only on
the OS type, not on target, we remove all target-dependent archive readers.
commit 48fe63f04e8fe6d158d9290b4dd4a1c6203dd94b
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 10:40:07 2011 +0800
add iterator for each data in the Allocator.
commit c0223e1943542c1fd1ad4ca34ad55e1870ffc703
Author: luba <lubatang@gmail.com>
Date: Fri Jul 29 02:05:11 2011 +0800
A syntax-correct BinaryTree
commit 4368ec551ebb65fd127f5d93caafdf8304c93753
Author: Duo <pinronglu@gmail.com>
Date: Thu Aug 18 18:18:47 2011 +0800
add scaffording of algorithm about MCArchiveReader.
commit 25fb7e66a8d5eeee84e333f39d32b3d673aa0a4a
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 18 17:40:12 2011 +0800
Change design: Need no MCObjectTargetReader.
commit ab133b6d81efc4cdb03b233289b7d341fd6691b4
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 18 16:40:55 2011 +0800
Implement mcld::MCAsmObjectReader::RecordRelocation() done.
commit a5b299ed5fc0614867cff23949d0c679b60a999a
Author: Duo <pinronglu@gmail.com>
Date: Thu Aug 18 16:36:00 2011 +0800
fix a bug: archive map is big-endian, and turn on the binaryTree test case.
commit 3ae4df53b920d33e5ff4daa9be8532eecf386441
Author: Duo <pinronglu@gmail.com>
Date: Thu Aug 18 10:40:31 2011 +0800
Refine BinaryTree::merge(): change template argument order.
commit 89c9f31107b7cd98732176bf1201d08270d886b6
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Aug 18 10:06:49 2011 +0800
Fixing MCObjectReader
it reads hello-jni.o & libhellojni in NDK samples
commit 1d65d9314fee829ef96cf032cf0c4f131e9410bc
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 18 09:09:47 2011 +0800
Implement mcld::MCAsmObjectReader::RecordRelocation().
commit a9d1e8f2ff5db35977ce46d8a6f0b7ea16d2fbb2
Author: Duo <pinronglu@gmail.com>
Date: Wed Aug 17 22:15:41 2011 +0800
Refine the DFSIterator inheritance system. Add scaffording of MCArchiveReader. Modify MCLDDriver::normalize(), and let it can traverse to an archive. Use "using BinaryTree<Input>::merge" expression in InputTree, so we can use it from object of InputTree. Shut donw The test case of BinaryTree. I will fix it later.
commit 17b939b0d4b942c10da0c27d96a5baa98da31965
Author: csmon7507 <csmon7507@gmail.com>
Date: Wed Aug 17 20:29:40 2011 +0800
add a new class - PathSet
PathSet is a specifized set of Path for fast searching.
commit 0e2b86f9f80b2fd92b321492df1dcb1db4b7d750
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Aug 17 19:58:54 2011 +0800
Fixing isMyFormat() for MCELFObjectReader
commit a9e63c955ab1765e349056c3b52bbe9414143f7d
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 18:03:42 2011 +0800
Offer reloc_iterator for MCLDContext.
commit 38d447e04716c45e09a13a76968c31116ff7b0a0
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 17:52:22 2011 +0800
Add `has_addend' field into RelocationEntry.
commit 881b7fb08a0c63a2fb077130709f3f9f2bc343df
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 17:34:35 2011 +0800
Make comment more clear for r_info.
commit ffb5d1c298dfe2679fb07d05b6af6a31b9341220
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 17:25:45 2011 +0800
Determine the common relocation entry.
commit 09ab13aee039f0f0cc2acef622f8d54aaa1ed5df
Author: Duo <pinronglu@gmail.com>
Date: Wed Aug 17 17:09:20 2011 +0800
Let it no compilation error.
commit a787aecfd812b6094a08cd42b9e618d6597c9e8b
Author: luba <lubatang@gmail.com>
Date: Wed Aug 17 13:36:47 2011 +0800
Remove a redundant function - Inputfactory::produce(StringRef pName);
commit 93862ae3fc92ae806cdc40bd36999591e08bc744
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 12:03:28 2011 +0800
Move Relocation to ELFRelocation.
There is a design defect in MCLDContext which should have a
RelocationInfo reference or pointer, not an ELFRelocationInfo.
This version of MCLDContext will break scalability from ELF
to other format.
This code is not done yet.
commit ee5b46e5350cb889d9e077daaf8cba888b8529d7
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 11:17:19 2011 +0800
Code cleanup for end-of-line space.
commit e9b7421319e2b1dfe82dfc5dc534223f56417716
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 17 09:58:07 2011 +0800
We don't need `-relocation-model=pic' anymore.
commit 18d8ec16c4a20a0ed58e7fc7e5667bceac9556e1
Author: luba <lubatang@gmail.com>
Date: Wed Aug 17 09:56:56 2011 +0800
enable MCLDDriver::normalize() in SectLinker::doFinialization()
commit 240c7ba85ce5b6c4da79f81254a1f588a0fe210b
Author: luba <lubatang@gmail.com>
Date: Wed Aug 17 09:55:43 2011 +0800
bool trace() has been moved in GeneralOptions.
User can get trace() by calling MCLDInfo.options().trace()
commit 365e42996b540e6780aadfdf3d2215b728ef7994
Author: luba <lubatang@gmail.com>
Date: Wed Aug 17 09:51:03 2011 +0800
In normalization, ContextFactory should produce Context by the path of mcld::Input. Not a empty path.
commit d0c193c27afb258ac60e9a22b2f0df312ea230db
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 16 21:01:24 2011 +0800
Add scaffolding of RelocationEntry.
commit 2fcae7190c95cd1773d7b1ff809575242f2021f7
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 16 20:32:23 2011 +0800
Move RelocationTable from MCLinker to MCLDContext.
commit f4ddd568fc9716bd875556e5c4723a608fc9cfdd
Author: Nowar Gu <nowar100@gmail.com>
Date: Tue Aug 16 20:23:38 2011 +0800
Take out -mcpu option from MCELFObjectReader.
commit 4a881cdebf2200f61daa39a74b4981b6b485812f
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Aug 16 19:54:26 2011 +0800
Adding scaffolding of normalize()
commit abdae55a774537da7d2275e2ca6b6768776e3739
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Aug 16 19:53:42 2011 +0800
Adding missing header files
commit 248fffdc3060fde55c905718694c5cb3b3097ad6
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 19:18:12 2011 +0800
call InitializeAllTargetMCs() in main()
commit ef001ac6fa6c57d193f33b14e47e5ba26777814a
Merge: 9dd3ca2 d94fde2
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 18:10:16 2011 +0800
Merge branch 'master' of upstream
commit 9dd3ca28740de2e117d0cac00961b2d3ce36d829
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 18:05:50 2011 +0800
mcld::InputTree::bfs/dfs iterators advance more one step when it meets a Group.
commit d94fde270f14e94c80ffebd6504c4044ce8c76e9
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 18:05:50 2011 +0800
mcld::InputTree::bfs/dfs iterators advance more one step when it meets a Group.
commit ea3a2cdfc8a50dfa796718f9d79d2df27566514e
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 16:21:09 2011 +0800
Default bitcode is add in MCLDInfo.
MCLDInfo::bitcode can get the default bitcode that comes from LLVM.
default bitcode is inserted into MCLDInputTree with mcld::Input::Object
type and namespec - "default bitcode"
Of course, it's the first element of the input tree, and its attribute
is predefined.
commit fcc4c583c5fbfe2137af9de68637851780700c4d
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 15:16:55 2011 +0800
Finish MCLDDriver::linkable()
commit 5571053cbd3b56bcfd3ee567f3b8190be52e2f05
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 14:41:08 2011 +0800
AttrConstraint - The constraint of attributes.
Create a dedicated class for the constraint of attributes.
commit 2a06832f716272d94c6a7823ec3c7998d62cb16b
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 11:40:53 2011 +0800
add the scaffolding of MCLDDriver::linkable.
commit 489c64c9fb1004130de3341ffe40b4547a443eb7
Author: luba <lubatang@gmail.com>
Date: Tue Aug 16 11:04:52 2011 +0800
Fix a bug - all MCLDInput get the same attribute.
For easilier readable, I rename
MCLDAttribute -> AttributeProxy
AttributeBase -> Attribute
Since many mcld::Input shares common attribute, but AttributeFactory
can not assign the very identical pointer of attribute to different
mcld::Input when the pointed attribute will be modified in the future.
So, we let AttributeProxy hold the pointer of the attriubte. When we
change the attributes by proxy, mcld::Input will be affected and stick
to the same Attribute.
commit 6b0fb384d0b103289d7c1f4f8cd53656c6879be3
Author: luba <lubatang@gmail.com>
Date: Mon Aug 15 23:11:41 2011 +0800
Luba changes the big design of MC Linker
1. all factories are composed in MCLDInfo.
2. ARMELFSectLinker is responsed for initialize Attribute and Factories
3. MCLDContext is created by ContextFactory
4. Allocator<DataType, ChunkSize> and Allocator<DataType, 0> means two different allocation timing.
5. AttributeFactory is a Makov-chain of produced attribute
6. AttributeFactory is hidden in InputTree and MCLDInfo.
commit 54d196cecedb2b3557f3a486d177bd33f4ffe344
Author: luba <lubatang@gmail.com>
Date: Mon Aug 15 15:58:57 2011 +0800
Create the scaffolding of RealPath.
commit 008073c80b760f43856e78cdae94a9ab71c0427a
Author: luba <lubatang@gmail.com>
Date: Sun Aug 14 03:19:39 2011 +0800
partial specification template of Allcoator<DataType, 0> is the run-time allocator.
Benefit from template partial specification on Allocator<DataType, ChunkSize>,
we use Allocator<DataType, 0> as the run-time allocator. The size of chunk of run-time
allocators is no longer a compile-time constant, instead, a run-time integer passed in
by constructor.
commit 8723b5b5a8a5de9bd35e7d57edfaae5daa546425
Author: luba <lubatang@gmail.com>
Date: Sun Aug 14 01:33:36 2011 +0800
Change the roles of SectLinker, MCLDInfo, and LLVMTargetMachine.
MCLDInfo comprises of
- attribute factory
- input factory
- context factory
- the default output
- script options
- general options
- input tree.
The construction of MCLDInfo is target-independent.
Although MCLDInfo contains some target-dependent information, such as the
default attribute and the default script, the construction of these data
should be target-independent. Therefore, we move the construction of MCLDInfo
to LLVMTargetMachine.
SectLinker now is in charge of the construction of target-indepedent data.
Such as the default input file and the default output file. The target-
dependent data are contructed by the inheritor of SectLinker. Take
ARMELFSectLinker for example, target depedent data, like default link script
and the defaut attribute are configured in the constructor of ARMELFSectLinker.
commit 95d1833f8c0b05fd5e309cf48f68cbd1c3ff6cd0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Aug 15 21:30:37 2011 +0800
Removing verbose debugging information
commit a6afc50cd2bad2b558b0c6272088fbec73849a5d
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Mon Aug 15 20:36:19 2011 +0800
Fixing MCObjectReader for new commits
The tool "MCObjectReader"
in "tools/MCObjectReader" works again
commit 4e471a376dfd693a75820d724926476b638551a4
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 11 16:54:59 2011 +0800
Fix typo of RTGCFactory.
commit eef6a26070c136d5d4e61a65a0bae725b8d9f9fb
Author: luba <lubatang@gmail.com>
Date: Thu Aug 11 16:48:36 2011 +0800
finish the implementation of RTGCFactory
commit 2c535a11f7ed4a5bb25b6c4e369db7a5b5177598
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 11 16:41:39 2011 +0800
fix some typo error
commit f8669a7161bf32007d69c80136509cbe297e2cbf
Author: luba <lubatang@gmail.com>
Date: Thu Aug 11 16:04:35 2011 +0800
Implementation of RTLinearAllocator
commit 880b2a188c2a50b3b35f02b94db29a349dd322d6
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 11 15:32:15 2011 +0800
Add unittest of RTLinearAllocator.
commit b35d1e81872946af73b58d61b71bcfeced2bf07d
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 11 15:24:56 2011 +0800
Take out the third parameter of RTLinearAllocator constructor.
Since `llvm::BumpPtrAllocator::DefaultSlabAllocator’ is private,
I think we don't need this default parameter.
commit 63d05ca9bc638aae051c3b01e892a294c14bcb4b
Author: Nowar Gu <nowar100@gmail.com>
Date: Thu Aug 11 14:42:47 2011 +0800
Add missing namespace llvm.
commit 5d1c0c59490647636c558fc4690003c5fc6413f7
Author: luba <lubatang@gmail.com>
Date: Thu Aug 11 14:33:34 2011 +0800
Add a new Linear Allocator for run-time
commit 89af031c2a52fda3ec7ede2e8343576334c2fee5
Author: luba <lubatang@gmail.com>
Date: Thu Aug 11 10:03:50 2011 +0800
allow MCLDInputTree insert a mcld::Input from outside.
In original design, MCLDInputTree should handle the construction of
mcld::Input. Now, we loose this constraint and let MCLDInputTree can
insert a mcld::Input from the outside world.
commit 82e499de419fb359b23cd99a1aebd21b728ef318
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Aug 10 22:49:45 2011 +0800
Add some implementation of RelocData and MCLinker.
Sorry I cannot write a unittest, since MCLDInfo and TargetLDBackend
is not done yet, and MCLinker needs both of these.
This is a placeholder commit that tell others I have started doing
the relocation part. The function is not done yet.
BTW, the LLVM patch has a bug.
We use `delete' in MCAssembler.h, so we should use `include' instead
of forward declaration.
Be care of compilation warning!!
commit 4c52ab1a94d11c1a427893a35c79f473e4c198c8
Author: luba <lubatang@gmail.com>
Date: Wed Aug 10 18:02:18 2011 +0800
attribute is attached on MCLDFile.
SectLinker can create attribute by the command line.
InputTree::Input can attach attributes
default attributes is set up by ARMELFSectLinker
commit d44c009bdafa554d34cc6b4d8c521334f1589e72
Author: luba <lubatang@gmail.com>
Date: Wed Aug 10 11:20:01 2011 +0800
add a new class MCLDInput to replace original MCLDFile.
Since the information of input and of output are different, we separate
the API of MCLDFile into MCLDInput and MCLDOutput.
This also help MCLDInput to have a clear Type information.
commit cf36b90a49f9b9ce0869b7886f6d80c2339ccf81
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 20:55:21 2011 +0800
attach attributes on MCLDFile
commit dd6f24dc258ebab40990ca47c826f8d16732b65a
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 20:37:43 2011 +0800
create MCLDAttribute and AttributeFactory
commit 28ede4c5b059684bd1781c7e0012470118c42d6e
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 19:10:36 2011 +0800
Luba is so stupid
commit 302c02d95568158ea42b990e6e187cf6a3e68b2f
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 19:07:54 2011 +0800
Sorry, Luba is stupid.
commit fe6427aa910cbe43ee40e7709e676ff1c2678d3e
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 19:00:41 2011 +0800
Sorry, Luba forgot to add GNULDBackend
commit 578716cb391c50b1c30c8f2ece5d1fc63906545a
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 15:57:35 2011 +0800
add partial specific less<mcld::sys::fs::MCLDFile>
add this template functor to help map insert MCLDFile.
commit 0fda962322d03f59b6c9541c702fc391b5724706
Author: luba <lubatang@gmail.com>
Date: Tue Aug 9 15:02:48 2011 +0800
create a new garbage collection factory - GCFactory
commit 919ba478b7ac30c837d30868a11b4efbe0989669
Author: csmon7507 <csmon7507@gmail.com>
Date: Tue Aug 9 14:46:19 2011 +0800
finish is_directory and exists
commit 7ec21a0559f49e6bee6556e77a4475e761a7c431
Author: luba <lubatang@gmail.com>
Date: Mon Aug 8 20:37:20 2011 +0800
Cancel the target-dependent archive reader.
Since the difference of the formats of archive files are only on
the OS type, not on target, we remove all target-dependent archive readers.
commit 8d7f351964693b4e4ab5cd56d0d604b438eb7ddf
Author: Duo <pinronglu@gmail.com>
Date: Mon Aug 8 20:06:55 2011 +0800
Add a test case for class InputTree at file MCLDInputTree.
commit 7ff101919738cac6ac7b865b8205a9a8156d4c6a
Author: Nowar Gu <nowar100@gmail.com>
Date: Mon Aug 8 17:59:09 2011 +0800
Fix scaffolding of class MCLinker.
There are still some functions not implemented yet.
But this won't bother the regression test.
commit 8791439a87a605a510e818e88e07c3110d63539c
Author: Duo <pinronglu@gmail.com>
Date: Thu Aug 4 19:21:45 2011 +0800
Add DFSIterator and BFSIterator of InputTree.
Fix a bug : BinaryTree::join() runs the opposite direction when join a new node.
commit 07efe81e55fed84e85aa7d625579d2d1ba8b71ff
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 21:44:41 2011 +0800
Fix a bug :
Leftward => Downward => Inclusive
Rightward => Afterward => Positional
ROOT (right == self == end)
/
begin
/ \
A B
commit 139b56db6f0a1e66a02406607ab4e74a73cd2cff
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 20:40:15 2011 +0800
Fix the bug - self assignment of BinaryTree and TreeImpl
commit 29cfb44b90dd8a1a0bfbda1e2ab12b7fff47d2fb
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 20:28:50 2011 +0800
add testcase LinearAllocator and FactoriesTest.
commit 27096837de3748c003e968c1e1d5582b37dab15c
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 20:27:04 2011 +0800
fix a bug coming from LLVM. LLVM StringRef::size does not contain '\0' character.
Therefore, if we use strcpy, we always copy lack of the last charactor.
commit ec71a6ec68b282b3dc442f7ddc0ca60cc5542f6b
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 19:42:06 2011 +0800
Fix a bug - NodeFactory object can not delegate itself.
If the object detect this situation, do nothing.
commit fb0c7a4c0e7aa078647d57a5e67e0b3d2ac9d558
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 18:59:21 2011 +0800
Fix a bug in LinearAllocator.
If there are no chunks being initialized, end() will segmentation fault by access m_pCurrent->bound.
commit 4c207da72add8936f5ba396473560e00170a8a7c
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 17:59:49 2011 +0800
Fix bugs in BinaryTree
1. TreeImpl::summon calls the wrong function
2. Move NodeFactory::iterator function to public
commit 7577359a7b01b50f673a43522502a5b1f2f49fdd
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 17:34:06 2011 +0800
Fix a bug - compiler can not specify template function TreeBase::move()
- incorrect template argument type - template<size_t DIR> move()
commit 1d3de703a7df46b3d49526e20fe81935f8cd8eec
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 17:22:48 2011 +0800
remove redundant message in TreeAllocator
commit 1133f8acdae1cad09c3a0756b94c49ffa9aa68ca
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 17:19:31 2011 +0800
Fix a bug in the LinearAllocator
Bug - Iterator never goes to the end()
commit ab35d771eda74e000ddb88bfe5736dc64fb3d88d
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 13:53:42 2011 +0800
Fix bugs in LinearAllocatr
1. the conditions of equivalent comparison is insufficient. We should
also compare the positon of iterators
commit c25906995a913dba516a560f9a5b5d9852a7cec3
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 10:56:54 2011 +0800
add directory, and fix some basic syntax bugs in MCLDDirectory.
commit a247cb32d8c4ffe3489d8acda41c9b0eaf602ac8
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 10:45:11 2011 +0800
Add host-specific Path libraries
commit 8d7d3c5f720db801e3bac0c02b821b0b23da56bb
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 10:45:11 2011 +0800
Add host-specific Path libraries
commit 105397d60a3313e59f71951462133bfd0ea378f6
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 10:39:34 2011 +0800
add new class - Directory
commit 2b694ac4ee4f8dbe89869fae53f4a0bdbd10e424
Author: Duo <pinronglu@gmail.com>
Date: Tue Aug 2 10:20:24 2011 +0800
initialize MCAsmInfo for LLVM 3.0svn's demand
commit 27fd0e6462f1382880ba0dcd7e143f962a52d914
Author: luba <lubatang@gmail.com>
Date: Tue Aug 2 10:18:10 2011 +0800
fix a bug - m_pRoot is forgetten to be initialized.
commit 02f62cf3e15dcd21ab3ba544d5cd6ac70978fdc7
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 20:57:37 2011 +0800
Check host. If host is unix, set LLVM_ON_UNIX=1. On the other heand, if host is win-32, set LLVM_ON_WIN32=1.
commit 2bf6cc71e2b7cd1617f89a0330cc2d96c5404db1
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 18:58:03 2011 +0800
move create function of MCLDInfo out of SectLiner, and let it work like MCAsmInfo.
commit 577ae17fa105f9e01d93df344d30d0936c4f2a02
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 13:32:32 2011 +0800
add `-t' argument on the command line.
commit af25232ed7848ff7e4ad7029311dc693eccf0fa7
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 12:30:10 2011 +0800
move out traits from TreeBase.h
extract common code of LinearAllocator::iterator and const_iterator to DataIteratorBase
commit bfe60efa3a076ced231e61eff65b80728966f90f
Author: luba <lubatang@gmail.com>
Date: Mon Aug 1 10:40:07 2011 +0800
add iterator for each data in the Allocator.
commit 6ccff786637f1f0367c765bf9e9019c337a7b761
Author: luba <lubatang@gmail.com>
Date: Fri Jul 29 12:01:54 2011 +0800
make binary tree and allocators are uncopyable.
commit 2554fcf2b1791d4664718f273892686c4c8b7f7a
Author: luba <lubatang@gmail.com>
Date: Fri Jul 29 11:50:46 2011 +0800
remove the DataType construction in Binary Tree.
Data construction should be handled by the user of binary tree, not
tree itself.
commit 557270c556ddbdf3719ff32c552378ec85ef5bf6
Author: luba <lubatang@gmail.com>
Date: Fri Jul 29 02:05:11 2011 +0800
A syntax-correct BinaryTree
commit d9b60663c5dccde749adddb058086d51202b5a15
Author: luba <lubatang@gmail.com>
Date: Fri Jul 29 01:15:19 2011 +0800
- Finish LinearAllocator
- Finish STL Compatible Binary Tree
- Remove useless MCLDBackend file
commit 43835d5a177724b3c16173fad79164824f25225b
Author: luba <lubatang@gmail.com>
Date: Thu Jul 28 14:31:08 2011 +0800
finish the implementation of linear allocator.
linear allocator is a two-phase memory allocator.
commit 0a8f0553b1edcf8bd11d20a2a29318d11fa3efaa
Author: luba <lubatang@gmail.com>
Date: Thu Jul 28 10:59:04 2011 +0800
Add a new directory - ADT to store abstract data types.
commit 715d7ed9b72c168a7841ba31994022c6ed708677
Author: luba <lubatang@gmail.com>
Date: Wed Jul 27 22:18:25 2011 +0800
finish the scaffolding of binary tree
commit 40df3d49c5facf0bf8f1002ba3c597244cc33f28
Author: luba <lubatang@gmail.com>
Date: Wed Jul 27 20:36:45 2011 +0800
finish the scaffolding of InputTree, which be used in SectLinker.
commit bfdb6d770ca14e070131a9ead11088086d28f341
Author: luba <lubatang@gmail.com>
Date: Wed Jul 27 15:14:24 2011 +0800
change MCLDInfo's member from pointers to reference.
commit 7d0f04541d188135cca533a043a4a0bb37d51a01
Author: Duo <pinronglu@gmail.com>
Date: Thu Jul 28 13:17:20 2011 +0800
a test for BinTr[Cee
commit cb971398cf663efc4e07f96f1e1aee70ad561ecf
Author: Jush Lu <jush.msn@gmail.com>
Date: Wed Aug 3 22:20:50 2011 +0800
Adding a new tool "MCELFObjectReader"
Seeing tools/MCObjectReader/README for the details
commit cc3be0820ab0296171757db207612373de627a91
Author: Jush Lu <jush.msn@gmail.com>
Date: Wed Aug 3 22:18:36 2011 +0800
Adding parts of implementation of MCELFObjectReader
It includes readObject() & dump()
MCELFObjectReader reads entries in Symbol Table
It stores entries with MC data structures
such as MCSectionData & MCSymbolData
commit 6ef3ae35c0c7939ec7be65ded4392bfbd1105556
Author: Jush Lu <jush.msn@gmail.com>
Date: Wed Aug 3 22:17:17 2011 +0800
Updating LLVM.diff.patch for MCObjectReader
LLVM.diff is obsolete here, it should be updated by someone
commit b0aa341084d4dbf0520169c3697dbe6c9ae16921
Author: luba <lubatang@gmail.com>
Date: Wed Jul 27 14:23:13 2011 +0800
add Tree of inputs in the MCLDInfo
commit ca878a61afbf3564d616d5419649cda5a740231f
Author: luba <lubatang@gmail.com>
Date: Wed Jul 27 10:06:45 2011 +0800
change the name of method merge to join
commit 9340a5219aeda55e2dee4ca3d060f6b264e8e58b
Author: luba <lubatang@gmail.com>
Date: Tue Jul 26 21:48:07 2011 +0800
new an abstract BinaryTree
commit 3c34067b2c229797d9f8ec8ac8d529e427ae532d
Merge: 9e54bab c1466b6
Author: luba <lubatang@gmail.com>
Date: Mon Jul 25 16:57:18 2011 +0800
Merge branch 'master' of upstream
Conflicts:
include/mcld/MC/MCLDInputFileList.h
lib/MC/MCLDInputTree.cpp
commit 9e54bab294d03e22510e0b6c8ffc20f6b5fbcb5f
Author: luba <lubatang@gmail.com>
Date: Mon Jul 25 16:46:09 2011 +0800
add a new sub-class - SectLinker::PositionDependentOptions to handle the position of options on the command line.
SectLinker can traverse the list of PositionDependentOptions and push each option into the tree of input files.
commit 3b33658b41bf31157199aa55ab679e68686a966b
Author: luba <lubatang@gmail.com>
Date: Fri Jul 22 00:04:20 2011 +0800
describes the classes of Command line options.
commit c1466b6987aae2ee090b9c4b01de6d2719290320
Author: Jush Lu <jush.msn@gmail.com>
Date: Fri Jul 22 14:37:16 2011 +0800
Creating patches for "patch" command & "git apply"
All patches are for LLVM r135569
For building MCLinker project,
Choosing one of them is enough.
Applying patches from $(LLVM_ROOT)
commit a64e424c39585edc7baf4641b56001a4348814c8
Author: Nowar Gu <nowar100@gmail.com>
Date: Wed Jul 20 14:01:55 2011 +0800
Update patches.
commit add2cb3dc1c70ae32f5fd9055f3bd6bcc149bcd8
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 20 13:57:40 2011 +0800
fix error : lack of destructor of MCLDInputFile::Node
commit d7386c24bf457606647b8aa2546d329f047fb65d
Merge: 70c2f5f 9d9c56b
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 20 09:17:24 2011 +0800
Merge branch 'master' of upstream
commit 70c2f5f549d6a8a3d3aae0dde20028d53a87a3c3
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 20 09:15:22 2011 +0800
change the algorithm of MCLDInputFileList creation.
commit 9d9c56be8967adabde6fc2b0bd2a865aadb19d0a
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 21:48:21 2011 +0800
write the basic idea about how to get position of input options from command list.
commit 0acf73aecc22ee6b670443f205367ea04b5b71c2
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 21:08:08 2011 +0800
add four testcases for exists and is_directory
commit 7d499957063a2fb5ec5aa21ae3823a6afa7de533
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 21:07:43 2011 +0800
let -dB not be necessary
commit 7fd5edc2908ea0e0a7f247e0040ea405b4488f6d
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 20:54:14 2011 +0800
complete parser<mcld::MCLDDirectory>
commit a99fcd8701a961735f73c5e4282705e3482d8046
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 19:44:24 2011 +0800
Add destructor of Path
commit bc93dd7c35e4bd37e8aeb9202a09e2005a7440d4
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 19:43:46 2011 +0800
add a new testcase for mcld::sys::fs::Path
commit d49d5d75f05beae037af960b146f4310de3df9b0
Author: luba <lubatang@gmail.com>
Date: Tue Jul 19 19:14:21 2011 +0800
1. add Path library for MC Linker
2. let CommandLine library can parse Path, Directory and MCLDDirectory
3. refine SectLinker
commit b37451de4e030adb22a06d6e462ec94fd9602aca
Author: Duo <duo@duo-laptop.(none)>
Date: Tue Jul 19 16:15:06 2011 +0800
delete unnecessary file.
commit c76959008f9ca054fe42ade590b42d452812f702
Author: Duo <duo@duo-laptop.(none)>
Date: Tue Jul 19 16:02:43 2011 +0800
refine the code of MCLDInputFileList
commit c5724a63c306b1261201cd0f7d12885f8ad134a8
Author: Duo <duo@duo-laptop.(none)>
Date: Tue Jul 19 14:15:15 2011 +0800
Change the data structure of MCLDInputFileList from graph to binary tree.
commit d46e90b0d55de5cd04801f691b69053a94e702d6
Author: Duo <pinronglu@gmail.com>
Date: Tue Jul 19 13:42:29 2011 +0800
patch for LLVM. ${llvm_src}$patch -p0 < ${mclinker}/patch/LLVM.diff
commit 2e7bb382da1c4c0f5a2ee69814655f786e8f6802
Author: Duo <pinronglu@gmail.com>
Date: Mon Jul 18 22:18:41 2011 +0800
Change the interface of MCLDInputFileList::iterator.
Remove member function insert and delelte ,and add to MCLDInputFileList.
commit 2af10e40c60f811dcfdf92fcb74230b50149c5dc
Author: Duo <pinronglu@gmail.com>
Date: Sat Jul 16 20:13:15 2011 +0800
build scaffolding of class MCLDInputFileList
commit 2b562e2c563066246ad140c83635ac38551260e0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Fri Jul 15 10:27:47 2011 +0800
Removing readers from Target directories
Using MCTargetObjectReader as target-dependent reader
commit 127ac107c998d8fc39d61fc7ad681999d2dd2425
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 17:44:25 2011 +0800
remove attribute from MCLDFile
commit 9acc1afca6cc15e60e65430b5e3eb2b30b58f011
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 17:28:16 2011 +0800
add sysroot functions in MCLDInfo
commit 27e7620fdfd50dd95adfd5992d00fe8fe89181b2
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 16:48:25 2011 +0800
refine the indent of MCLDFile to fit LLVM style.
commit d032e2fff236158f58dcbd5f5432aed656b25c79
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 16:20:33 2011 +0800
add SearchDirs class.
commit c10c150e630f18c3baf84d349895926cf4cd410f
Merge: 4f21432 4975671
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 16:13:20 2011 +0800
Merge branch 'master' of upstream
commit 4f21432c245e0a7fba6b484db5395308ac002482
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 16:09:46 2011 +0800
1. add Support directory to deployment
2. add a new flag `-dB' to indicate default bitcode.
commit 49756716c3587b7867c03fa3180f6d0f9d7ab2d1
Author: luba <lubatang@gmail.com>
Date: Thu Jul 14 16:09:46 2011 +0800
1. add Support directory to deployment
2. add a new flag `-dB' to indicate default bitcode.
commit 88c40df44a703822110da88f03a1291add5f92a9
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 13 18:41:10 2011 +0800
add a new class MCLDFileTree using to decide the linking order.
Delete unnecessary component of MCLDFile.
commit 82c826db4de17b7ead4d116baeed0489320fd1e5
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 18:09:03 2011 +0800
add a "should be failed" case into search_patch case
commit 7d5ecb8a2e9947e74cd82eb7758da540f4b5663f
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 15:52:43 2011 +0800
fixes a bug of undefined StringRef. We forget to expose llvm namespace scope to him.
commit 76c6111032f0a1efc644002c7e40d0ce0eff4308
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 15:19:46 2011 +0800
add the basic interface of MCLDDriver for input files being listed in command line
commit 21ab372cf2373743e6653ccff05daeb12035531e
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 15:06:12 2011 +0800
add a new regression test for search path of MCLinker
commit e9052e14e5dfba835a6c0643be6a7b48bfad5185
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 15:05:32 2011 +0800
make the output format of regression test pretty.
commit 6eacfa06a1301bd54f7f290726d11c047a53a520
Author: luba <lubatang@gmail.com>
Date: Wed Jul 13 12:34:39 2011 +0800
connect SectLinkers and MCAsmObjectReader by default bitcode.
commit 70b24badc0d4ecf72b4a8ca61256bdabff98cd50
Merge: 08a7dc6 1f35ba1
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 13 12:01:49 2011 +0800
Merge branch 'master' of upstream
commit 08a7dc684e98d91aeffda8468dfd116e7c291dd8
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 13 11:50:32 2011 +0800
build scaffolding from SectLinker to MCLDDriver.
Associative ARM target SectLinker is also built.
commit 1f35ba1650b309d8a07f599b978d329814bf6ef5
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 13 11:50:32 2011 +0800
build scaffolding from SectLinker to MCLDDriver.
Associative ARM target SectLinker is also built.
commit 0fb90820592c45c91458fd5d8285b7dd1314b41e
Author: csmon7507 <csmon7507@gmail.com>
Date: Tue Jul 12 17:40:41 2011 +0800
add empty class of MCLDInfo.
commit 7f85da66537af515455074306f98a778656896f3
Author: Duo <pinronglu@gmail.com>
Date: Tue Jul 12 14:20:04 2011 +0800
Remove files that can not be compiled well
MCFragment
commit 15fcc51a77f33d12ac6a464041fbf15b016b4ae4
Author: luba <lubatang@gmail.com>
Date: Tue Jul 12 14:07:17 2011 +0800
add patch to llvm::MCAssembler
commit b89166ef732ac3e08e831f81b00459b68b234310
Author: Duo <pinronglu@gmail.com>
Date: Tue Jul 12 13:55:45 2011 +0800
Merge Makefile.am
commit dfe026a989117000fde23bc768d2bf397cff62f3
Author: luba <lubatang@gmail.com>
Date: Tue Jul 12 12:13:19 2011 +0800
remove AsmPrinter from SectLinker.
Every MachineFunctionPass must be added into PassManager before calling MachineFunctionPass::runOnMachineFunction().
However, in our original design, AsmPrinter is called by SectLinker. AsmPrinter is not added into PassManager and can not be initialized correctly.
Therefore, we move AsmPrinter out from SectLinker, and add AsmPrinter back to PassManager.
SectLinker gets the result of AsmPrinter by the references of common data - MCLDContext.
commit 246dc88093431e928c882e516f0b16f365d00359
Author: luba <lubatang@gmail.com>
Date: Tue Jul 12 11:29:20 2011 +0800
redirect assembler to MCAsmObjectReader
commit 34a7c5f905f1f289664699ff5aba649fc205b6d3
Author: luba <lubatang@gmail.com>
Date: Tue Jul 12 11:28:46 2011 +0800
remove invalid testcases
commit 423d4a4291568f0e0e8b2008b2e494eea564747b
Author: luba <lubatang@gmail.com>
Date: Tue Jul 12 09:52:56 2011 +0800
add the scaffolding of class MCAsmObjectReader.
commit 8416f02ae41a056052a0daa2edfcb29b9d2e017c
Author: luba <lubatang@gmail.com>
Date: Mon Jul 11 17:36:19 2011 +0800
Follows the most new LLVM svn3.0. refine the patch
commit 8de15e5bb9e6f993443c47ded878a829fbc8de36
Author: luba <lubatang@gmail.com>
Date: Mon Jul 11 14:23:25 2011 +0800
add a new regression test - file.
`file' make sure the output can be examined by `file' command.
commit 7cabe6765817c51cb4ef44b9f597b772ccb5be51
Author: luba <lubatang@gmail.com>
Date: Mon Jul 11 14:09:19 2011 +0800
clean all temporary files while tearing down.
commit 7c8fb9792c6212b1324be83b24df33149637b457
Author: luba <lubatang@gmail.com>
Date: Mon Jul 11 13:45:10 2011 +0800
add -typefile=asm, obj to MCLinker.
Now, MCLinker has full ability of llc.
commit 7e292189aa7df0f3a129d769b5040b15084a252c
Author: luba <lubatang@gmail.com>
Date: Mon Jul 11 13:43:41 2011 +0800
add setup()/teardown() functions in regression test. Rename the majar test function as testcase().
commit 1530b82d3118b56ee0833bfd9ae809d39bf9edfe
Author: Duo <pinronglu@gmail.com>
Date: Sun Jul 10 22:31:06 2011 +0800
scaffolding of MCObjectFile : MCSectionData Proxy
commit 29a64bcce7ab848c1aa0fa33904b22a147531233
Merge: 1318d11 87bf885
Author: Duo <pinronglu@gmail.com>
Date: Sun Jul 10 22:23:11 2011 +0800
Merge branch 'master' of upstream
commit 1318d111fa3c782fd1c9ef36e787f24bcc169a1e
Author: Duo <pinronglu@gmail.com>
Date: Sun Jul 10 22:19:51 2011 +0800
scaffolding of MCObjectFile : MCSectionData Proxy
commit 87bf88552b388c202aeeab97f1b0e19458a45444
Author: Luba Tang <luba@LubaSite.site>
Date: Sun Jul 10 02:59:57 2011 +0800
remove some files that should not be pushed into git repositry
commit d718be5216f28b5e3219a614779fb1981558f3a6
Author: luba <lubatang@gmail.com>
Date: Sat Jul 9 21:43:21 2011 +0800
create SectLinker in LLVMTargetMachine
commit d79eeec475ee7c58b33b06de2e9ae0408ee68a17
Merge: 578c1a2 fdd7db8
Author: luba <lubatang@gmail.com>
Date: Sat Jul 9 20:59:15 2011 +0800
Merge branch 'master' of upstream
commit 578c1a299aefbbc1b0b0e670e8ee95ecfce1e373
Author: luba <lubatang@gmail.com>
Date: Sat Jul 9 20:47:21 2011 +0800
register target-dependent SectLinker into mcld::TargetRegistry
commit fdd7db8b56b8011b8fdcbef589f30169fe30cfc8
Author: Duo <pinronglu@gmail.com>
Date: Sat Jul 9 00:17:56 2011 +0800
Modify MCObjetfile.cpp and MCObjectFile.h
commit b4bea44a7996f7c7c066a20855c56bb536f178bc
Author: luba <lubatang@gmail.com>
Date: Fri Jul 8 20:13:26 2011 +0800
add regression test
commit 5e0041bd6002e192cd4cc50dfe2e50b733735a22
Author: Duo <pinronglu@gmail.com>
Date: Thu Jul 7 21:10:20 2011 +0800
Modify mclinker/debug/Makefile.am : add MCObjetFile.h MCObjectFile.cpp
commit e14640dcb45f5803b5cd88be53b6af011c5f206e
Merge: 272e6f4 f4674cb
Author: Duo <pinronglu@gmail.com>
Date: Thu Jul 7 20:47:41 2011 +0800
Merge branch 'master' of upstream
commit 272e6f4773d661464eb2cbac2a0dee6741931d18
Author: Duo <pinronglu@gmail.com>
Date: Thu Jul 7 20:39:42 2011 +0800
Scaffolding of MCObjectFile : Finish Iterator
commit f4674cb222ae9f42b4979311133bc05bf602355b
Author: luba <lubatang@gmail.com>
Date: Thu Jul 7 18:22:36 2011 +0800
Finish scaffolding of all readers and writers.
commit f04d1ce24a52f26ed32792bb4252c2de86ef8571
Author: luba <lubatang@gmail.com>
Date: Thu Jul 7 11:50:20 2011 +0800
add_class can add target-dependent files into source directory.
commit 0abe2a2f36291f1240b139e73fdf03592e180675
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 6 23:50:47 2011 +0800
Test case for MCArchiveReader/MCObjectReader.
commit 237df5f6c266e18198b76f880fd5b265e4c5e7a9
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 6 20:42:31 2011 +0800
Build the interface of ELF Archive/Object readers.
commit 81182a67a348361bd882c66bf55ccfe0d3a2b112
Author: Duo <pinronglu@gmail.com>
Date: Wed Jul 6 20:38:18 2011 +0800
build the abstract interface of ArchiveReader and ObjectReader
Let TargetLDBackend owns the function pointer of the constructor of readers
commit c2679593c1cb7849df679fc920633f514c93802c
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 22:18:41 2011 +0800
make the scaffolding for createTargetLDBackend.
ARM's createTargetLDBackend has not implemented yet.
The result is assert in
MCLinker: ../lib/Target/ARM/ARMLDBackend.cpp:25: mcld::TargetLDBackend* mcld::createARMLDBackend(const llvm::Target&, const std::string&): Assertion `0 && "MC Linker for ELF system has not been supported yet"' failed.
commit 8c80a4949dbed040cdc2df8258487860491d60e9
Author: CIT
Date: Tue Jul 5 15:12:23 2011 +0800
LLVM version 3.0svn changes the API about llvm::TargetMachine.
downstream with the macro LLVM_VERSION
commit d7d4560bf7eadb9e23bedb9248d84aa73911e21f
Author: CIT
Date: Tue Jul 5 15:08:53 2011 +0800
pass LLVM_VERSION into source code.
add -DLLVM_VERSION=${LLVM_VERSION} in the compilation command line
commit 5bb8e229139994709c200c1b9d753d58fbadbb95
Merge: 16c4c90 128b419
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 14:57:21 2011 +0800
Merge branch 'master' of upstream
commit 16c4c901b88b6475483360312359f84cf23b9291
Merge: de71d4e bccffcd
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 14:53:13 2011 +0800
Merge branch 'master' of upstream
add ARMTargetInfo
commit 128b419b7688ddef6c2ae9bcee7201932112307c
Merge: de71d4e bccffcd
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 14:53:13 2011 +0800
Merge branch 'master' of upstream
commit de71d4e3110f16b739cc7581050baa0d3d1770d5
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 12:29:09 2011 +0800
Initialize mcld::TargetMachine
mcld::TargetMachine has right mcld::Target
mcld::TargetRegistry can find corresponding mcld::Target
mcld::Target::createTargetMachine can create mcld::TargetMachine
commit bccffcdcc2c1dd854bbcca2a64051fb1e6dda3e4
Author: luba <lubatang@gmail.com>
Date: Tue Jul 5 12:29:09 2011 +0800
Initialize mcld::TargetMachine
mcld::TargetMachine has right mcld::Target
mcld::TargetRegistry can find corresponding mcld::Target
mcld::Target::createTargetMachine can create mcld::TargetMachine
commit 4d1d9b34b89b942918a410ca186b2f85fd3e1122
Author: luba <lubatang@gmail.com>
Date: Mon Jul 4 21:42:30 2011 +0800
Finish adapters of mcld::TargetMachine, mcld::Target, and mcld::TargetRegistry
Now, mcld::Target::createLDBackend works.
commit fbb629cace23e37adba86623ab44380103f822be
Author: luba <lubatang@gmail.com>
Date: Mon Jul 4 17:53:10 2011 +0800
Add a new alias mk.
command `mk' can make MCLinker in any level of directory.
commit f3b5cec6bc19a8d19a83767a9ccdfcfd0def7d00
Author: luba <lubatang@gmail.com>
Date: Mon Jul 4 12:26:43 2011 +0800
add Initialize##TargetName##Linkers() and corresponding InitializeARMSectLinker() functions.
commit b514f27c60b1d5cc0b65a3a981511fe73b43a1db
Author: luba <lubatang@gmail.com>
Date: Thu Jun 30 21:05:56 2011 +0800
add m4 macro to specify targets when executing `./configure' script.
* Enumlate all targets in include/mcld/Config/Targets.def
* Enumlate all linkers in include/mcld/Config/Linkers.def
commit 7e3056811244ca3429dc73ff038f3e906cccf5c2
Author: luba <lubatang@gmail.com>
Date: Thu Jun 30 14:26:21 2011 +0800
Add implementation of Target
commit 41d758f2ee25665de835c54b44a9ae3cb2c9a8d0
Author: Jush Lu <jush.msn@gmail.com>
Date: Sun Jun 26 21:08:07 2011 +0800
Add a core function "getMCInstruction"
to MCELFObjectReader
Which is based on MC Disassembler
commit 95c6fc7a8dd0ecffa27b507f183dbac2c25e2769
Merge: 7cdd6dd 514c75a
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 17:35:22 2011 +0800
Merge branch 'master' of upstream
commit 7cdd6dd3dea91c22fbcf36617bdf6386b7d8650e
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 17:34:43 2011 +0800
finish a basic scaffolding of mcld::TargetMachine
commit 41303498bcf209f8596dd49bce5fa6d3caddc920
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 17:13:27 2011 +0800
a new patch for LLVM. Move function LLVMTargetMachine::setCodeModelForStatic() to public field.
commit 514c75a4c4db94348a9e684c1c0930ab0412c172
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jun 23 14:28:36 2011 +0800
Add MCLDCommand header and footer
commit 48e02772557403c2323a588fc28eb28c0e6bc19c
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 13:29:41 2011 +0800
adds new UML object diagram of MCLinker
commit 8c33cc12e4e98024487c90e5e8377932eeb3e7d9
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 12:05:44 2011 +0800
fix a typo error in header template.
commit 6d6349e91c6c38b2f10383ef3ea040a52dcb43b1
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 12:01:08 2011 +0800
Add header and footer in MCLDDriver
commit 20e91885a70cb4114393ae0267d15899b47914dd
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Thu Jun 23 11:44:17 2011 +0800
Add MCLDDriver header file
commit f1f330d1d9da0bf6550f888442ddc85d513609a1
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 11:23:58 2011 +0800
Add mcld::LLVMTargetMachien to do object adapter of llvm::TargetMachine
commit 37b5687318121493422c07adff2b448798ef21f6
Author: luba <lubatang@gmail.com>
Date: Thu Jun 23 09:30:27 2011 +0800
change debug macro from -DDEBUG to -DMCLD_DEBUG.
Google test also has a macro -DDEBUG. In order to avoid from conflict, we rename our own macro.
commit 828928ec7d8fa497003411b617e189bc10dd078b
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 17:53:41 2011 +0800
Update Makefile.am for LLVMTargetMachine
commit bfc89176b49a6634fd29cf636bfd34972b1a45b3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 17:47:53 2011 +0800
Rename lib/CodeGen/TargetMachine.cpp
to lib/CodeGen/LLVMTargetMachine.cpp
Avoid confusion with lib/Target/TargetMachine.cpp
commit fa383b819cfce9fe343e6087cd41e27e0e6ae8c0
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Jun 22 16:51:02 2011 +0800
LLVM 2.9 (stablest) and LLVM 3.1 (newest) have different API.
In order to run on these versions, I add new macro - LLVM_VERSION
In LLVM 2.9, LLVM_VERSION is 2, and in LLVM 3.1, LLVM_VERSION is 3.
Developers can separate code into different versions like that:
{{{
#!cpp
#if LLVM_VERSION > 2
... code in LLVM 3.1 API...
#end
}}}
commit edb0c63e826178304b75809440b517bf6022d560
Merge: dc2bc00 1345fe4
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Jun 22 16:39:26 2011 +0800
Merge branch 'master' of upstream
commit 1345fe46fc9ff6daf7aaabb413a01e15b8204d29
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 15:40:16 2011 +0800
Add LDBackend creation and registry
commit dc2bc00d94472ddb8af699c5d81381c876cba689
Merge: 3527e74 3a57e65
Author: Luba Tang <lubatang@gmail.com>
Date: Wed Jun 22 15:07:05 2011 +0800
Merge branch 'master' of upstream
commit 3a57e65fe1d7728f317bd14bd4f05bb9fa6995a3
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 11:54:55 2011 +0800
Add createLDDriver
commit 71c5abea9295a59b8f1045ba5ce31bf4355358f9
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 11:48:43 2011 +0800
Comment createStreamer
Add LDDriver
commit 30401a99499413bdfbf0ea081678c54b44322cdd
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Wed Jun 22 11:44:48 2011 +0800
Adding MCLDDriver stub
commit eb1bb9813e95c98dbcc449c019ecff824a353ca1
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jun 21 21:50:17 2011 +0800
Adding implementation of TargetLDBackend
Which is similar to TargetAsmBackend
commit 3527e74f6760a8f41c1c08412197d5532791d063
Merge: 937032d e3039fb
Author: Luba Tang <lubatang@gmail.com>
Date: Tue Jun 21 21:40:54 2011 +0800
Merge branch 'master' of upstream
commit e3039fb8e51d11664895570362e2bc99724770ea
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jun 21 21:34:04 2011 +0800
Create TargetLDBackend.cpp
Move TargetLDBackend.h
commit 82fc3f57dcc678ed026a5da516b3095e333b53b0
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jun 21 19:25:40 2011 +0800
Adding LDBackend header files
commit ed5708821020fc1a5dcf627e9860174f2bce4dd6
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jun 21 19:20:23 2011 +0800
Adding implementation of addPassesToEmitFile
commit 9638fe989a26ecf4418044174234cc376e666013
Author: Jush Lu <Jush.Lu@mediatek.com>
Date: Tue Jun 21 16:59:05 2011 +0800
Removing merge legacy
commit 937032de3e1724326c61f0d3102a531eebda0af3
Author: Luba Tang <lubatang@gmail.com>
Date: Tue Jun 21 00:26:49 2011 +0800
fix a typo error
commit 2cdd7e52e24f3d60cdb4655f04e4840f8502ad7b
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 17:37:38 2011 +0800
Change the name of project - from bold to MCLinker
commit 194ff3bb3abdaac1a8751046e986b91435bef5e2
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 17:30:50 2011 +0800
Move addPassToEmitFile from extern "C" to namespace mcld
commit 31d2211b9c6fdcc9c6bec2e3357bc2da1f18585e
Merge: 402686b 9668907
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 17:08:47 2011 +0800
Merge branch 'master' of upstream
commit 402686b6034c87add9d85d935880bcbfe02910e8
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 17:07:19 2011 +0800
Change the deployment
* from lib to lib/MC, lib/CodeGen, lib/Target
* from include to include/mcld/MC, include/mcld/CodeGen, include/mcld/Target
commit 96689072ec13ef8d24a1bf2cb64698edabcaa2bd
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 16:40:39 2011 +0800
Copying ELFObjectWriter into ELFLDWriter
Replacing "ObjectWriet" by "LDWriter"
commit 3a0c8ef7e635f7a01464e408071298c6a843cd85
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 16:24:34 2011 +0800
change the template files:
*. project name - MCLinker
*. namespace - mcld and mcldtest
commit ba07f54285b901e7307cd5e943a6858f73fe4d4c
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 16:19:10 2011 +0800
Adding MCELFLDTargetWriter
commit ce739351767ee26d46f840c165a9c3e1ac3983c3
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 16:18:55 2011 +0800
add virtual function addCommonPasses() to class TargetMachine.
Original, it's a private member function of LLVMTargetMachine.
commit 4ebe8ec401b05c7532db36aa309d23c5b4612e34
Merge: 2055a07 6dd7074
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 15:59:37 2011 +0800
Fix a stupid typo error
Conflicts:
src/main.cpp
commit 2055a07192fca451b24da12e092bba2c477da7ea
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 15:52:55 2011 +0800
FileType in GetOutputStream() should be compared with mcld::CGFT_XXXFile, not old TargetMachine::CGFT_XXXFile
commit 6dd7074906b6965d56cd891db270aed480a6fa55
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 15:52:55 2011 +0800
FileType in GetOutputStream() should be compared with mcld::CGFT_XXXFile, not old TargetMachine::CGFT_XXXFile
commit e12362af59a508ca61c7e8f88356483db954528a
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 14:35:16 2011 +0800
Add a README of `patch' directory.
commit a079b86e5d316641416d43127774de21d5e028e0
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 14:28:43 2011 +0800
Add a patch of LLVM. In LLVM, the function addCommonCodeGenPasses() is hidden.
Let addCommonCodeGenPasses() be public.
commit 6c27377a22e5b420809a7fb20b1451e2122ef50e
Author: luba <lubatang@gmail.com>
Date: Mon Jun 20 14:02:14 2011 +0800
CodeGen has a sub-directory CodeGen. It dis-follows the rule of LLVM directory structure.
remove CodeGen/CodeGen, and move all files to the up CodeGen directory.
commit aee528f7cd55ff97e44eb8a36fbb00543251e2d4
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:37:45 2011 +0800
Adding MCLD header files
commit 4613cdedb8d987ad7a4301cd70379c755561d0ce
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:27:20 2011 +0800
Adding CodeGen stubs
commit 81b188f30a851e5045e1d223ec4f8b7cf3f79ebf
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:24:16 2011 +0800
Add mcld headers
commit 0d5669cc5654c15d99f7cde0099a57e21d79bc4b
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:09:07 2011 +0800
Update build scripts
commit c1f4f9ebcd06f093beeef03e8e444ebd9f521a63
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:04:54 2011 +0800
Adding unittest for TargetMachine
commit ae4faa7f5654ce0caa0d0b0f206c22445d816ef8
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:03:32 2011 +0800
Adding MCLDScriptReader stub
commit 6ca29571adb961e8b15174eac02163df890720c6
Author: Jush Lu <jush.msn@gmail.com>
Date: Mon Jun 20 00:02:17 2011 +0800
Adding MCLinker stub
commit 17f4f2df233f266334f0fb8d2ba024053eed5c52
Author: Jush Lu <jush.msn@gmail.com>
Date: Sun Jun 19 19:11:25 2011 +0800
Rename MCLDWriter to ELFLDWriter
commit 22e8328de9407e585731c34dd46930f547abb279
Author: Jush Lu <jush.msn@gmail.com>
Date: Sun Jun 19 14:53:54 2011 +0800
Adding stubs for ARMLDBackend.
commit 26dca80bfeed3852582dd053fd1b634f62365e6b
Author: Jush Lu <jush.msn@gmail.com>
Date: Sun Jun 19 13:21:41 2011 +0800
Adding README
commit a83e4f52cd5267013b5ae32e3e357f428a7ed0b8
Author: Jush Lu <jush.msn@gmail.com>
Date: Sat Jun 18 00:51:10 2011 +0800
Adding Java side implementation of NDK-MCLinker
NDK-MCLinker invokes MCLinker via NDK
commit 8848eebd46440d2b4fdc76f24707b840914171a8
Author: Jush Lu <jush.msn@gmail.com>
Date: Fri Jun 17 23:46:53 2011 +0800
Creating directories and files for MCLinker architecture
commit 97bf250afe8e3d1cecc67782786c2497bd942e03
Author: luba <lubatang@gmail.com>
Date: Wed Jun 1 10:22:47 2011 +0800
fix a bug
if either llvm-config --version is A.Bsvn, or minor version is less than required minor version,
configure return error.
commit b64d8cbda3946b9b9000e38c05ce27b63761e6d1
Author: luba <lubatang@gmail.com>
Date: Thu May 26 15:58:56 2011 +0800
`./configure' script for checking LLVM is done.
see [ticket:36]
commit 8798e5d890a6abb6a2c3ee594269a8eebe586b4d
Author: luba <lubatang@gmail.com>
Date: Wed May 25 20:25:05 2011 +0800
Move TEST_F from the header to the implementation.
This is more fit using scenario.
commit 4152b15f8bf84e960d9f0c27510b6a9075e60239
Merge: 3a6af50 b4fd4b4
Author: luba <lubatang@gmail.com>
Date: Wed May 25 17:49:36 2011 +0800
Merge branch 'master' of upstream
commit 3a6af5027bc1a8ba114613383242041d1140111a
Author: luba <lubatang@gmail.com>
Date: Wed May 25 17:46:43 2011 +0800
Add empty but necessary directories.
commit b4fd4b471548b438f8a2e1e211a3de9d6f15dd84
Author: luba <lubatang@gmail.com>
Date: Wed May 25 17:46:43 2011 +0800
Add empty but necessary directories.
commit 8ffdbc6323d3da1bac857b5eb8339254cf9eb432
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:38:35 2011 +0800
put created headers in the ${BOLDTOP}/include/
commit ee26ff715b457e3e81bbfacdfaa128ba18f2e5a7
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:37:56 2011 +0800
main function doesn't invoke gtest correctly. fixes these bugs.
commit 31d5729e35caec19a891bb6dee0cc9863462a409
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:24:28 2011 +0800
The same bug like [ticket:46] in the `add_class' program.
commit 1c5bc38d4e355334ba35e3b8c9da50bb12163340
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:20:48 2011 +0800
Fix a bug in envsetup.sh
see [ticket:46]
commit 666d5974763bc6505166af60d9ee40a3bfc78fba
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:19:22 2011 +0800
include unit-test header
commit 7f4383c62d978776f693cdbc37b1140676c5d95c
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:08:29 2011 +0800
add friend class for the unit-test
commit 35e67c3dc80fa8419ee444e625cf7e19b2032897
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 17:06:52 2011 +0800
Modify the template of testcases.
see [ticket:44]
commit 55097d1ed67274906fa67f146d2d71ff8566d244
Author: Luba Tang <lubatang@gmail.com>
Date: Wed May 25 15:34:33 2011 +0800
Change some configurations of the testing framework.
* put compiled object files into obj/
* use libtool to create `libgtest.la' library
* modify configure.ac to add above functionalities.
* change the #include path `gtest.h'
commit 1fa3e17175b520915cf59ac3f02f8b64b110db06
Author: luba <lubatang@gmail.com>
Date: Wed May 25 14:31:30 2011 +0800
create the basic infrastructure of unit-test.
using google C++ test
see [ticket:37]
commit b059d14f37660ae196148a03a89ed8166e67197d
Author: luba <lubatang@gmail.com>
Date: Tue May 24 18:39:49 2011 +0800
Implementation of the add_class tool is completed.
See [ticket:39]
commit bc6f1008bb26ea90e18c531613563911120e903c
Merge: 68cd61e 4b4b6e0
Author: luba <lubatang@gmail.com>
Date: Mon May 23 20:31:26 2011 +0800
Merge branch 'master' of upstream
commit 68cd61ef8bc135b04295196786679e6e7bab56ff
Merge: 2b52163 40b3a4c
Author: luba <lubatang@gmail.com>
Date: Mon May 23 17:55:19 2011 +0800
create the building system - using auto-tools, and basic directories.
commit 4b4b6e0b340e87996a6573edee48f02cd26cbe5d
Merge: 2b52163 40b3a4c
Author: luba <lubatang@gmail.com>
Date: Mon May 23 17:55:19 2011 +0800
Merge branch 'master' of upstream
commit 2b52163847724611b3f788eac22193e6b18abb03
Author: luba <lubatang@gmail.com>
Date: Mon May 23 17:44:59 2011 +0800
creates the building system - using auto-tools, and basic directories
commit 40b3a4c09e1437356c9cb56ddb6c17c02fa9c117
Author: luba <lubatang@gmail.com>
Date: Mon May 23 17:44:59 2011 +0800
creates the building system - using auto-tools, and basic directories
commit 32562fc969851b1cda32729dc475265e59e6c3ec
Author: TDYa127 <a127a127@gmail.com>
Date: Mon May 23 14:19:31 2011 +0800
Test proxy.
commit b85e50a9971913a9ff6ba9786cea38198f8d540f
Author: luba <lubatang@gmail.com>
Date: Tue May 17 10:31:26 2011 +0800
On branch master
Changes to be committed:
new file: bold/Makefile.am
new file: bold/README
new file: bold/configure.ac
new file: bold/debug/Makefile.am
new file: bold/optimized/Makefile.am
Build the basic directory structure of BOLD project.
I choose auto-tools as our build system for following reasons:
1. auto-tools are standard build system for cross platform compilation
2. CMake is another building system for cross platform. although it's
also used in LLVM, it support less libraries than auto-tools.
commit 13a0eafbe004a0364e16cc2980d8cac0b83710bb
Author: luba <lubatang@gmail.com>
Date: Mon May 16 17:59:08 2011 +0800
Test for big file
commit dbca9ba423827d80d8449582838f2e2d7bd62766
Author: luba <lubatang@gmail.com>
Date: Mon May 16 17:49:25 2011 +0800
try to commit files
commit 93b33cc586bc288ff62fcd0b252ee26b1fe0ed8b
Author: duo <duo@duo-desktop.(none)>
Date: Wed May 11 22:54:36 2011 +0800
add a new file hello
commit ab80f8a8c0816105777a2156fcaec0dcce928bb2
Author: csmon7507 <csmon7507@gmail.com>
Date: Wed May 11 19:18:13 2011 +0800
push to new brach csmon
commit fd5b000f8eaf2bdd306de7ce8489f251c172ccf5
Author: csmon7507 <csmon7507@gmail.com>
Date: Wed May 11 19:15:37 2011 +0800
add a folder source
commit 73b347ed1941bef06dd946365d72a9cbbb21ba43
Author: csmon7507 <csmon7507@gmail.com>
Date: Wed May 11 17:22:42 2011 +0800
First revision
commit 4af68d56600382997a90cf7541d95b734d71bb37
Author: csmon7507 <csmon7507@gmail.com>
Date: Tue May 10 12:12:29 2011 +0800
First revision