4 years agoFix comparison between signed and unsigned integer expressions [-Werror=sign-compare]. master
Pete Chou [Mon, 29 Dec 2014 13:05:19 +0000]
Fix comparison between signed and unsigned integer expressions [-Werror=sign-compare].

Change-Id: Icfd4133b73c62d1ac7c9b076e5c3959219bb0671

4 years agobuild: Accept arm64 target.
Pete Chou [Mon, 29 Dec 2014 07:51:30 +0000]
build: Accept arm64 target.

Change-Id: If7e687fc49548eba5a6735256b8978381668fd75

4 years agoMerge branch 'master' of https://android.googlesource.com/toolchain/mclinker into...
Andrew Hsieh [Thu, 16 Oct 2014 10:35:52 +0000]
Merge branch 'master' of https://android.googlesource.com/toolchain/mclinker into aosp

Conflicts:
m4/llvm.m4

Change-Id: I809c460cb338707818dff205979427af8fcd00ed

4 years agoAdd an option --enable-shrink-binary-size to configure.
Ray Donnelly [Mon, 26 Aug 2013 23:43:26 +0000]
Add an option --enable-shrink-binary-size to configure.

This option could reduce the LLVM tools by "-fdata-sections, -ffunction-sections"
and "--gc-sections". Note that with --enable-shrink-binary-size, your LLVM tools
might not be able to load plugins (ex: LLVMPolly).

The default is off to make NDK llvm tools support plugin.

This commit mirrors two commits in the Android LLVM git repo, from release_33
branch:

1: Ray Donnelly <mingw.android@gmail.com>
6230037 Fixes for "Shrink binary sizes when cross-compiling."

2: Lai Wei-Chih <Robert.Lai@mediatek.com>
0190585 Add an option --enable-shrink-binary-size to configure.

4 years agoShrink binary size when cross-compiling.
WenHan Gu [Fri, 24 May 2013 08:21:57 +0000]
Shrink binary size when cross-compiling.

Add these flags in cross-compiling mode:
  CFLAGS="-Os -ffunction-sections -fdata-sections -fvisibility=hidden"
  CXXFLAGS="-Os -ffunction-sections -fdata-sections -fvisibility=hidden"
  LDFLAGS="-Wl,--gc-sections"

Change-Id: I63e2df17711e669f828cd6008f4dc851690ab1dd
Signed-off-by: WenHan Gu <Wenhan.gu@mediatek.com>

4 years agoRevert "ARM: Fix exidx ordering."
Pete Chou [Tue, 7 Oct 2014 04:34:21 +0000]
Revert "ARM: Fix exidx ordering."

This reverts commit 16c6eb74e234fc96ed81b2b09db14056f674a9d5.

4 years agolint: Fix style for backend Relocators
Diana Chen [Thu, 2 Oct 2014 07:08:06 +0000]
lint: Fix style for backend Relocators

4 years agolint: Fix style for DebugString and MergedStringTable
Diana Chen [Thu, 2 Oct 2014 06:49:38 +0000]
lint: Fix style for DebugString and MergedStringTable

4 years agotest: Update golden files
Diana Chen [Thu, 2 Oct 2014 06:06:51 +0000]
test: Update golden files

4 years agoFix build break after rebase
Diana Chen [Thu, 2 Oct 2014 06:01:10 +0000]
Fix build break after rebase

4 years ago[mips] Update MIPS golden files.
Simon Atanasyan [Thu, 18 Sep 2014 10:44:32 +0000]
[mips] Update MIPS golden files.

4 years agoFix the indentation
Diana Chen [Mon, 15 Sep 2014 03:25:28 +0000]
Fix the indentation

4 years agodebug info: Refine the flow of handling the .debug_str merging
Diana Chen [Fri, 12 Sep 2014 11:45:11 +0000]
debug info: Refine the flow of handling the .debug_str merging

Move DebguString from Module to output .debug_str LDSection.
The flow of handling debug string merging:
1. ObjectLinker::mergeSections - parse the input .debug_str sections and add the
   strings to DebugString merged table
2. ObjectLinker::preLayout - set the output offset of the debug strings and size
   the output section
3. ObjectLinker::relocation - apply the debug string offset accordings to
   corresponding relocations

4 years agoarm: Refine error message
Diana Chen [Thu, 28 Aug 2014 02:27:43 +0000]
arm: Refine error message

4 years agodebug info: Implement getDebugStringOffset and applyDebugStringOffset in backends
Diana Chen [Wed, 27 Aug 2014 10:01:11 +0000]
debug info: Implement getDebugStringOffset and applyDebugStringOffset in backends

1. Add implementation in AArch64 and Mips32
2. Fix X86 and ARM functions. Currently we only support relocations against the
   .debug_str section symbol.

4 years agodebug info: Fix DebugString::processRelocs
Diana Chen [Tue, 26 Aug 2014 10:54:36 +0000]
debug info: Fix DebugString::processRelocs

Record the relocation symbol against sections with DebugString kind, instead of
the symbol name which is .debug_str.

4 years agodebug info: Get and apply debug string offset in backend relocator
Diana Chen [Tue, 26 Aug 2014 09:04:43 +0000]
debug info: Get and apply debug string offset in backend relocator

1. Add Relocator::getDebugStringOffset and Relcoator::applyDebugStringOffset to
   get and apply the debug string offset accordings to the relocation type.
2. Implement getDebugStringOffset and applyDebugStringOffset in ARM and X86.

4 years agodebug info: Handle the mergeable debug string table
Diana Chen [Tue, 26 Aug 2014 07:57:03 +0000]
debug info: Handle the mergeable debug string table

1. Add LDFileFormat::DebugString to denote the section .debug_str
2. Process relocations to get the debug strings and merge them
3. Apply the relocations against .debug_str to set the output offset of the
   strings after they have been merged.
4. Emit the merged debug string section.

4 years agodebug info: Add DebugString and MergedStringTable
Diana Chen [Tue, 26 Aug 2014 07:52:03 +0000]
debug info: Add DebugString and MergedStringTable

DebugString represents the debug string table, .debug_str, which the strings are
mergeable. All the input .debug_str sections will be merged into one output
section which each string is unique in the table. This can reduce the size of
.debug_str.

4 years agoSimplify Path::append().
Pete Chou [Wed, 1 Oct 2014 07:20:15 +0000]
Simplify Path::append().

4 years agoUse memcpy instead of strcpy.
Pete Chou [Wed, 1 Oct 2014 07:08:49 +0000]
Use memcpy instead of strcpy.

4 years agolint: Fix [readability/function] [3] errors.
Diana Chen [Wed, 1 Oct 2014 03:31:06 +0000]
lint: Fix [readability/function] [3] errors.

4 years agoUpdate COPYING and LICENSE.TXT
Pete Chou [Tue, 30 Sep 2014 13:22:20 +0000]
Update COPYING and LICENSE.TXT

4 years agoRefine formatting.
Pete Chou [Tue, 30 Sep 2014 13:08:07 +0000]
Refine formatting.

4 years agolint: Fix [whitespace/comments] [4] errors.
Pete Chou [Tue, 30 Sep 2014 13:02:04 +0000]
lint: Fix [whitespace/comments] [4] errors.

4 years agolint: Fix [build/namespaces] [5] errors
Diana Chen [Tue, 30 Sep 2014 09:58:46 +0000]
lint: Fix [build/namespaces] [5] errors

4 years agoFix header description.
Pete Chou [Tue, 30 Sep 2014 07:28:17 +0000]
Fix header description.

4 years agoGC Uncopyable.h
Pete Chou [Tue, 30 Sep 2014 07:23:03 +0000]
GC Uncopyable.h

Introduce two new macros:
DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS.

4 years agolint: Disable build/include_order filter.
Pete Chou [Tue, 30 Sep 2014 06:33:00 +0000]
lint: Disable build/include_order filter.

LLVM include style is preferred.
http://llvm.org/docs/CodingStandards.html#include-style

4 years agoReformatting change.
Pete Chou [Tue, 30 Sep 2014 06:25:31 +0000]
Reformatting change.

4 years agoFix spelling.
Pete Chou [Tue, 30 Sep 2014 03:58:31 +0000]
Fix spelling.

4 years agoRemove unnamed namespace in header.
Pete Chou [Tue, 30 Sep 2014 03:19:42 +0000]
Remove unnamed namespace in header.

lint error: [build/namespaces] [4]

4 years agolint: Fix [build/namespaces] [5] errors for using namespace llvm.
Pete Chou [Mon, 29 Sep 2014 13:18:26 +0000]
lint: Fix [build/namespaces] [5] errors for using namespace llvm.

4 years agoFix include order.
Pete Chou [Mon, 29 Sep 2014 12:44:22 +0000]
Fix include order.

4 years agolint: Fix [build/include] [4] errors.
Pete Chou [Mon, 29 Sep 2014 12:26:18 +0000]
lint: Fix [build/include] [4] errors.

4 years agolint: Fix [whitespace/parens] [2] errors.
Pete Chou [Mon, 29 Sep 2014 10:38:00 +0000]
lint: Fix [whitespace/parens] [2] errors.

4 years agolint: Fix [whitespace/braces] [4] errors.
Pete Chou [Mon, 29 Sep 2014 10:10:48 +0000]
lint: Fix [whitespace/braces] [4] errors.

4 years agolint: Fix [whitespace/comments] [4] error.
Pete Chou [Mon, 29 Sep 2014 10:03:10 +0000]
lint: Fix [whitespace/comments] [4] error.

4 years agolint: Fix [whitespace/semicolon] [5] errors.
Pete Chou [Mon, 29 Sep 2014 10:01:46 +0000]
lint: Fix [whitespace/semicolon] [5] errors.

4 years agolint : Fix [whitespace/blank_line] [3] errors.
Pete Chou [Mon, 29 Sep 2014 09:59:02 +0000]
lint : Fix [whitespace/blank_line] [3] errors.

4 years agolint: Fix [readability/casting [4] errors.
Diana Chen [Fri, 26 Sep 2014 03:58:16 +0000]
lint: Fix [readability/casting [4] errors.

4 years agoARM: Fix exidx ordering.
Pete Chou [Fri, 26 Sep 2014 02:26:37 +0000]
ARM: Fix exidx ordering.

4 years agoFix formatting of data array.
Pete Chou [Thu, 25 Sep 2014 13:09:45 +0000]
Fix formatting of data array.

4 years agolint: Fix some [runtime/explicit] [5] errors.
Pete Chou [Thu, 25 Sep 2014 08:47:48 +0000]
lint: Fix some [runtime/explicit] [5] errors.

4 years agoBig reformatting changes!
Pete Chou [Thu, 25 Sep 2014 06:04:16 +0000]
Big reformatting changes!

Will continue to switch to google c++ style.
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html

4 years agoIntroduce cpplint(r138) as style checker.
Pete Chou [Thu, 25 Sep 2014 04:30:54 +0000]
Introduce cpplint(r138) as style checker.

4 years agoReformat header guards.
Pete Chou [Wed, 24 Sep 2014 13:38:23 +0000]
Reformat header guards.

4 years agoMore style fix for targets.
Pete Chou [Tue, 23 Sep 2014 11:55:06 +0000]
More style fix for targets.

4 years agoStyle fix.
Pete Chou [Tue, 23 Sep 2014 10:27:02 +0000]
Style fix.

4 years agoStyle fix for targets.
Pete Chou [Tue, 23 Sep 2014 10:26:29 +0000]
Style fix for targets.

4 years agoMore style fix.
Pete Chou [Tue, 23 Sep 2014 08:45:44 +0000]
More style fix.

4 years agoStyle fix for Target.
Pete Chou [Tue, 23 Sep 2014 08:38:29 +0000]
Style fix for Target.

4 years agoUse llvm::ELF::SHF_EXCLUDE.
Pete Chou [Tue, 23 Sep 2014 07:48:06 +0000]
Use llvm::ELF::SHF_EXCLUDE.

4 years agoUse DJB hash in PathCache.
Pete Chou [Tue, 23 Sep 2014 07:45:35 +0000]
Use DJB hash in PathCache.

4 years agoStyle fix for Support.
Pete Chou [Tue, 23 Sep 2014 07:43:56 +0000]
Style fix for Support.

4 years agoStyle fix for Script.
Pete Chou [Tue, 23 Sep 2014 07:04:27 +0000]
Style fix for Script.

4 years agoStyle fix for Object.
Pete Chou [Tue, 23 Sep 2014 06:34:38 +0000]
Style fix for Object.

4 years agoStyle fix for MC.
Pete Chou [Tue, 23 Sep 2014 06:13:57 +0000]
Style fix for MC.

4 years agoStyle fix for LD.
Pete Chou [Tue, 23 Sep 2014 05:33:08 +0000]
Style fix for LD.

4 years agoStyle fix for Fragment.
Pete Chou [Mon, 22 Sep 2014 13:51:44 +0000]
Style fix for Fragment.

4 years agoStyle fix for ADT.
Pete Chou [Mon, 22 Sep 2014 13:46:44 +0000]
Style fix for ADT.

4 years agoGC GraphLite.
Pete Chou [Mon, 22 Sep 2014 13:03:23 +0000]
GC GraphLite.

4 years agoStyle fix.
Pete Chou [Mon, 22 Sep 2014 07:40:10 +0000]
Style fix.

4 years agoStyle fix.
Pete Chou [Mon, 22 Sep 2014 07:05:51 +0000]
Style fix.

4 years agoGC unused initializers.
Pete Chou [Fri, 19 Sep 2014 04:52:35 +0000]
GC unused initializers.

4 years agoSupport printing mcld version.
Pete Chou [Tue, 16 Sep 2014 08:10:09 +0000]
Support printing mcld version.

4 years agoUse termination code in cstdlib.
Pete Chou [Tue, 16 Sep 2014 07:50:45 +0000]
Use termination code in cstdlib.

4 years agoFix typo.
Pete Chou [Mon, 15 Sep 2014 09:10:43 +0000]
Fix typo.

4 years agoldscript: Support INPUT command.
Pete Chou [Mon, 15 Sep 2014 07:41:26 +0000]
ldscript: Support INPUT command.

4 years agoFix style nits.
Pete Chou [Mon, 15 Sep 2014 07:37:37 +0000]
Fix style nits.

4 years agoSuppress unused const variable warning under non-debug build.
Zonr Chang [Wed, 3 Sep 2014 13:49:46 +0000]
Suppress unused const variable warning under non-debug build.

Change-Id: I55fbb7f78c5ab8ca2e88d242e3d4da257f9a0b00

4 years agoFix build with llvm trunk.
Pete Chou [Mon, 1 Sep 2014 12:02:12 +0000]
Fix build with llvm trunk.

commit 8c968628473c7de416e3f468fead20023f33107e
Author: Rafael Espindola <rafael.espindola@gmail.com>
Date:   Mon Aug 25 18:16:47 2014 +0000

    Modernize raw_fd_ostream's constructor a bit.

    Take a StringRef instead of a "const char *".
    Take a "std::error_code &" instead of a "std::string &" for error.

    A create static method would be even better, but this patch is already a bit too
    big.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216393 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1a7f705fba4b387ad251b0f303acec5c7131971d
Author: Rafael Espindola <rafael.espindola@gmail.com>
Date:   Wed Aug 27 20:03:13 2014 +0000

    Return a std::unique_ptr when creating a new MemoryBuffer.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216583 91177308-0d34-0410-b5e6-96231b3b80d8

4 years agoresolver: Fix ResolveInfo::overrideAttributes. Do not override the visibility.
Diana Chen [Mon, 1 Sep 2014 11:22:54 +0000]
resolver: Fix ResolveInfo::overrideAttributes. Do not override the visibility.

The visibility should be decided later by ResolveInfo::overrideVisibility

4 years agoarm: Fix scan relocation. Create dynamic relocation for REL type relocations.
Diana Chen [Mon, 1 Sep 2014 07:14:13 +0000]
arm: Fix scan relocation. Create dynamic relocation for REL type relocations.

4 years agoarm: Fix symbol@plt processing in relaxation.
Pete Chou [Wed, 27 Aug 2014 12:56:09 +0000]
arm: Fix symbol@plt processing in relaxation.

4 years agoParse GNU linker emulation argument for the MIPS 64-bir little-endian target.
Simon Atanasyan [Thu, 14 Aug 2014 12:29:48 +0000]
Parse GNU linker emulation argument for the MIPS 64-bir little-endian target.

4 years agocmake: Suppress policy CMP0023 warnings.
Pete Chou [Wed, 13 Aug 2014 06:13:38 +0000]
cmake: Suppress policy CMP0023 warnings.

4 years agoGC unused compilation codegen flow code.
Pete Chou [Tue, 12 Aug 2014 02:28:14 +0000]
GC unused compilation codegen flow code.

4 years agoFix build with llvm trunk.
Pete Chou [Mon, 11 Aug 2014 14:56:27 +0000]
Fix build with llvm trunk.

commit 9f85dccfc64b5f0b0c63ddfa0a42d8615aa1fcb3
Author: Eric Christopher <echristo@gmail.com>
Date:   Mon Aug 4 21:25:23 2014 +0000

    Remove the TargetMachine forwards for TargetSubtargetInfo based
    information and update all callers. No functional change.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214781 91177308-0d34-0410-b5e6-96231b3b80d8

commit f96cd1aeb59f4ee980e370a62020a4ee3da903ec
Author: Saleem Abdulrasool <compnerd@compnerd.org>
Date:   Sat Aug 9 23:12:20 2014 +0000

    ADT: remove MinGW32 and Cygwin OSType enum

    Remove the MinGW32 and Cygwin types from the OSType enumeration.  These values
    are represented via environments of Windows.  It is a source of confusion and
    needlessly clutters the code.  The cost of doing this is that we must sink the
    check for them into the normalization code path along with the spelling.

    Addresses PR20592.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215303 91177308-0d34-0410-b5e6-96231b3b80d8

4 years agoicf: make crc32 statically linked.
Pete Chou [Mon, 4 Aug 2014 04:37:18 +0000]
icf: make crc32 statically linked.

Add crc from zlib.

4 years agoUpdate README.
Pete Chou [Fri, 1 Aug 2014 09:01:31 +0000]
Update README.

4 years agoCheck LLVM 3.6.
Pete Chou [Fri, 1 Aug 2014 09:01:17 +0000]
Check LLVM 3.6.

4 years agoUpdate copyright year.
Pete Chou [Fri, 1 Aug 2014 08:45:01 +0000]
Update copyright year.

4 years agoFix R_386_GOT32 and R_X86_64_GOTPCREL processing.
Pete Chou [Thu, 31 Jul 2014 09:28:30 +0000]
Fix R_386_GOT32 and R_X86_64_GOTPCREL processing.

4 years agoldscript: Fix SUBALIGN.
Pete Chou [Wed, 30 Jul 2014 04:01:42 +0000]
ldscript: Fix SUBALIGN.

4 years agomcld: Set up ScriptList in GeneralOptions.
Pete Chou [Wed, 30 Jul 2014 04:00:13 +0000]
mcld: Set up ScriptList in GeneralOptions.

4 years agoRemove Quake tests.
Pete Chou [Mon, 28 Jul 2014 03:55:00 +0000]
Remove Quake tests.

4 years agoldscript: Remove %debug directive.
pete [Sun, 27 Jul 2014 15:28:01 +0000]
ldscript: Remove %debug directive.

Fix -Wunused-function for "yypstack" and "yypdumpstack" from bison.
Reported by Simon.

4 years agoEnable -Werror by default.
Pete Chou [Thu, 24 Jul 2014 09:58:22 +0000]
Enable -Werror by default.

Also sync ANDROID FLAGS used in unittest and ld.mcld.

4 years agoRemove unused variable ec.
Pete Chou [Thu, 24 Jul 2014 09:51:25 +0000]
Remove unused variable ec.

4 years agoSimplify software versioning.
Pete Chou [Thu, 24 Jul 2014 05:56:48 +0000]
Simplify software versioning.

4 years agoFix signed/unsigned comparison warning.
Logan Chien [Thu, 24 Jul 2014 09:40:59 +0000]
Fix signed/unsigned comparison warning.

4 years ago[Mips] Fix calculation of R_MIPS_26 relocation on 64-bit targets.
Simon Atanasyan [Wed, 23 Jul 2014 20:14:25 +0000]
[Mips] Fix calculation of R_MIPS_26 relocation on 64-bit targets.

4 years agoarm: Ignore the exidx if the linked text is folded.
Pete Chou [Mon, 21 Jul 2014 12:20:02 +0000]
arm: Ignore the exidx if the linked text is folded.

4 years agomcld: Fix build dependency.
Pete Chou [Mon, 21 Jul 2014 12:18:12 +0000]
mcld: Fix build dependency.

4 years agoFix argument type of -use-mcld
Diana Chen [Mon, 21 Jul 2014 06:54:10 +0000]
Fix argument type of -use-mcld

4 years agoUpdate ChangeLog.
Pete Chou [Fri, 18 Jul 2014 02:40:47 +0000]
Update ChangeLog.

4 years agoRemove the outdated information in README.
Logan Chien [Wed, 16 Jul 2014 09:07:38 +0000]
Remove the outdated information in README.

4 years agoFix ld.mcld link error.
Logan Chien [Wed, 16 Jul 2014 07:58:59 +0000]
Fix ld.mcld link error.

4 years agoEnable silent-rules to simplify the build log.
Logan Chien [Wed, 16 Jul 2014 07:35:37 +0000]
Enable silent-rules to simplify the build log.