Commit Graph

465 Commits

Author SHA1 Message Date
Ian Lance Taylor fee2edb1e4 From Craig Silverstein: sort options into alphabetical order. 2008-03-07 18:50:04 +00:00
Ian Lance Taylor 9531704395 Increase maximum bucket size for dynamic hash tables. 2008-03-07 16:30:59 +00:00
Ian Lance Taylor a8627968fb From Craig Silverstein: implement --hash-bucket-empty-fraction for real. 2008-03-07 16:27:33 +00:00
Ian Lance Taylor c18476e7f1 Recognize --hash-bucket-empty-fraction. 2008-03-07 07:00:48 +00:00
Ian Lance Taylor 6be6f3bdcd Use absolute address for relocations when not doing a relocatable
link.
2008-03-06 06:10:44 +00:00
Ian Lance Taylor a4d4b13f68 Use N_ for option help strings, and call gettext when printing them. 2008-03-06 05:51:42 +00:00
Ian Lance Taylor 09ffbbe0d4 From Craig Silverstein: accept any string for input format, warn if
thread options when not supported.
2008-03-06 00:53:37 +00:00
Ian Lance Taylor 7dfac99ff1 Don't use the user-specified output format unless the user actually
specified one.
2008-03-06 00:17:43 +00:00
Ian Lance Taylor 13670ee669 Support --hash-style=gnu. 2008-03-06 00:15:04 +00:00
Ian Lance Taylor ee1fe73e11 From Craig Silverstein: rework option handling to make it easier to
add a new option.
2008-03-04 23:10:38 +00:00
Ian Lance Taylor 7cc619c3b1 From Craig Silverstein: rename some option functions in preparation
for reworking option handling.
2008-03-04 18:21:43 +00:00
Ian Lance Taylor 021777a2ec Remove partial implementation that was never completed. This was
replaced by the Stringpool<> class.
2008-03-03 23:47:14 +00:00
Ian Lance Taylor 7d1a9ebbf2 Remove gcc 3.2 compatibility hacks. 2008-02-29 19:19:17 +00:00
Ian Lance Taylor 8f2eb564dd Permit scripts to refer to the addresses of output sections which were
not created.
2008-02-29 00:04:06 +00:00
Ian Lance Taylor 878405a889 Don't warn about redefinitions from a --just-symbols object. 2008-02-28 22:39:29 +00:00
Ian Lance Taylor 0dfbdef4c4 Support -d/--define-common. 2008-02-28 20:35:39 +00:00
Ian Lance Taylor da769d5629 Read input scripts which look like input objects with proper
serialization.
2008-02-28 19:46:06 +00:00
Ian Lance Taylor 919ed24cbc Don't check assertions until symbols are finalized. Create an output
section if the script uses a data statement with no input sections.
Don't create a loadable segment for the headers if there is no room.
2008-02-28 04:45:47 +00:00
Ian Lance Taylor 15cf077ef4 Put input sections with no flags in output sections with the same name. 2008-02-28 00:51:07 +00:00
Ian Lance Taylor 8851eccaec From Craig Silverstein: Have Parameters point to General_options. 2008-02-28 00:18:24 +00:00
Ian Lance Taylor 7019cd2565 Implement -q/--emit-relocs. 2008-02-27 22:38:18 +00:00
Ian Lance Taylor 1890b46591 Fix handling of ENTRY in linker script. 2008-02-27 15:09:16 +00:00
Ian Lance Taylor a5dc070655 From Craig Silverstein: rework handling of Script_options. 2008-02-26 22:48:08 +00:00
Ian Lance Taylor cd72c29180 From Craig Silverstein: implement -z max-page-size and -z
common-page-size.
2008-02-26 22:10:32 +00:00
Ian Lance Taylor 45aa233bdc From Craig Silverstein: rename option functions for future option
handling rewrite.
2008-02-26 21:45:30 +00:00
Ian Lance Taylor 935e887746 Align FDE and CIE lengths as needed. 2008-02-14 02:40:15 +00:00
Ian Lance Taylor fd247bfe68 Set load address for orphan sections. 2008-02-14 02:34:22 +00:00
Ian Lance Taylor 756ac4a80d Implement -Tdata and -Tbss. 2008-02-13 22:47:28 +00:00
Ian Lance Taylor 3edc73f245 Implement remaining linker script functions. 2008-02-13 22:44:50 +00:00
Ian Lance Taylor 0daa6f62c8 Support selecting target by name. 2008-02-13 02:44:50 +00:00
Ian Lance Taylor caa9d5d919 Assignments in linker scripts override definitions from object files. 2008-02-13 01:20:38 +00:00
Ian Lance Taylor 7508a0934e Implement LOADADDR and SIZEOF. 2008-02-13 01:18:53 +00:00
Craig Silverstein 9d37b37d37 Up version to 1.1, as the 1.1 binary was pushed to users today. 2008-02-12 02:01:32 +00:00
Ian Lance Taylor dceae3c154 Support dynamic relocations against local section symbols. 2008-02-12 00:28:48 +00:00
Ian Lance Taylor 4e8fe71f6c Set TEXTREL correctly when using a SECTIONS clause. 2008-02-12 00:24:00 +00:00
Ian Lance Taylor 0e43bb4edd Pass down alignment when adding input section to orphan section. 2008-02-12 00:17:35 +00:00
Ian Lance Taylor 33a3a15316 Force different sections to different pages for better results on
x86_64 Linux.
2008-02-12 00:15:40 +00:00
Ian Lance Taylor 03df6b3280 Fix precedence error, avoid signed/unsignd warning. 2008-02-12 00:13:39 +00:00
Ian Lance Taylor 77e655378d Track sections for expressions. 2008-02-09 01:22:17 +00:00
Ian Lance Taylor 8fc19601e8 From Cary Coutant: fix handling of undefined symbols in shared
libraries.
2008-02-08 22:49:22 +00:00
Ian Lance Taylor b0d8593d63 Don't read linker scripts in binary mode. 2008-02-08 07:31:09 +00:00
Ian Lance Taylor bc644c6cfc Add support for --format binary for input files. 2008-02-08 07:06:58 +00:00
Ian Lance Taylor 516cb3d01e Support --oformat binary. 2008-02-07 07:33:46 +00:00
Ian Lance Taylor 1ef1f3d387 Ignore version scripts for relocatable links. 2008-02-07 05:45:07 +00:00
Ian Lance Taylor 5fe2a0f55b Even when stripping all symbols, we need to write out the dynamic
symbol table.
2008-02-07 04:35:41 +00:00
Ian Lance Taylor 88dd47ac00 Implement --just-symbols, including -R FILE. Fix symbol values when
doing a relocatable link.
2008-02-07 01:51:25 +00:00
Ian Lance Taylor fbfba50887 Support creating empty output when there are no input objects. 2008-02-06 20:32:10 +00:00
Ian Lance Taylor 755ab8af10 Fix group signature handling for relocatable link, add bootstrap
relocatable test.
2008-02-06 19:32:32 +00:00
Ian Lance Taylor 6a74a71947 Initial -r support. 2008-02-06 08:13:50 +00:00
Ian Lance Taylor 56fd6e75db From Ollie Wild: add missing backquote to install-exec-local. 2008-02-05 22:22:09 +00:00
Ian Lance Taylor 7d26c6cc60 Print PHDRS clause for debugging. 2008-02-04 23:53:15 +00:00
Ian Lance Taylor 1c4f3631bd Implement PHDRS. 2008-02-04 22:54:31 +00:00
Ian Lance Taylor 15893b88b0 Treat an empty directory argument as the current directory. 2008-02-04 22:44:35 +00:00
Ian Lance Taylor fc955173bb From Craig Silverstein: support @file expansion. 2008-02-04 17:26:12 +00:00
Ian Lance Taylor 3802b2dd6b Implement SIZEOF_HEADERS, section constraints, other minor linker
script items.
2008-02-04 06:45:50 +00:00
Ian Lance Taylor 7cc77b5a09 Fully implement SECTIONS clause. 2008-02-04 05:46:12 +00:00
Ian Lance Taylor a445fddf82 Fully implement the SECTIONS clause. 2008-02-04 05:43:05 +00:00
Ian Lance Taylor 1cac254c18 Don't record file offset for CIEs. 2008-02-02 06:50:45 +00:00
Ian Lance Taylor 65778909ad From Cary Coutant: Ignore hidden symbols in a dynamic object. 2008-02-01 00:42:24 +00:00
Ian Lance Taylor 03e8f2b225 From Cary Coutant: Fix a case in which code takes the address of a
function and also calls it directly.
2008-02-01 00:39:10 +00:00
Ian Lance Taylor 8bc7a1c115 Permit ordinary object files in groups. 2008-01-26 01:35:10 +00:00
Ian Lance Taylor 9b07f471e3 Don't pass around the target in order to define symbols; get it from
the parameters instead.
2008-01-26 01:17:45 +00:00
Ian Lance Taylor 1dd940af63 From Craig Silverstein: Simplify Version_script_info::symbol_is_local
interface.
2008-01-24 22:35:39 +00:00
Ian Lance Taylor 5240d12aa0 From Cary Coutant: Fix last patch. 2008-01-24 00:51:57 +00:00
Ian Lance Taylor 55a934330a Originally from Craig Silverstein, with changes: support using a
version script to force symbols to be local.
2008-01-24 00:15:00 +00:00
Ian Lance Taylor e4967d85cb Use string instead of STRING, so that we handled QUOTED_STRING. 2008-01-23 19:31:56 +00:00
Ian Lance Taylor 0700cf329e From Cary Coutant: Fix mixing PIC and non-PIC relocs in the same
shared library.
2008-01-23 07:15:59 +00:00
Ian Lance Taylor 7d32031390 Add explicit dependencies on yyscript.h to make sure that it is
built.
2008-01-23 02:13:38 +00:00
Ian Lance Taylor 494e05f440 Parse a SECTIONS clause in a linker script. 2008-01-23 01:31:13 +00:00
Ian Lance Taylor 0c0a741125 Include <vector>. 2008-01-22 22:50:31 +00:00
Ian Lance Taylor cbcc4140e2 From Craig Silverstein: Optionally print command line for easier
debugging.
2008-01-18 23:41:31 +00:00
Ian Lance Taylor 106002249a From Craig Silverstein: Handle quoted strings differently in version
scripts, and handle extern "C++" in the middle of a block.
2008-01-18 23:35:09 +00:00
Ian Lance Taylor 14144f39e4 Don't include options.h in fileread.h. Remove General_options
reference from Output_file class.
2008-01-18 23:26:48 +00:00
Ian Lance Taylor 091244672e From Andrew Chatham and Craig Silverstein: Add support for version
scripts.
2008-01-15 23:41:28 +00:00
Ian Lance Taylor e5756efb6d Support assignments and expressions in linker scripts. 2008-01-09 19:57:45 +00:00
Ian Lance Taylor 2dd3e587bd Report linker script errors with line numbers. Ignore OUTPUT_FORMAT
with three arguments, and ignore OUTPUT_ARCH.
2008-01-07 05:19:02 +00:00
Ian Lance Taylor d391083d3c Add support for -e and for ENTRY in linker scripts. 2008-01-06 00:47:10 +00:00
Ian Lance Taylor fced7afdce Add -h/-soname option. 2008-01-04 05:35:24 +00:00
Ian Lance Taylor 1bedcac52a Don't create the postprocessing buffer if it already exists. 2008-01-04 05:04:56 +00:00
Ian Lance Taylor be2f3dec43 Add cast to avoid signed/unsigned warning. 2008-01-02 23:55:37 +00:00
Ian Lance Taylor cb29561284 Reduce the number of system calls. Use readv instead of pread. Do
better handling of cached views.
2008-01-02 23:48:49 +00:00
Ian Lance Taylor cf88803ada Use a simpler hash function. 2007-12-22 01:53:39 +00:00
Ian Lance Taylor 06a9731e8a Correct contributor name on new tests, remove #if 0 code. 2007-12-22 00:50:43 +00:00
Ian Lance Taylor 99f8facac9 From Cary Coutant: Fix handling of versioned symbols, add some tests. 2007-12-21 23:31:19 +00:00
Ian Lance Taylor 8d32f93595 Correct handling of non-section symbol in merged section. Avoid some
64-bit signed/unsigned warnings.
2007-12-21 23:08:25 +00:00
Ian Lance Taylor a9a60db689 Speed up relocations against local symbols in merged sections. 2007-12-21 21:19:45 +00:00
Ian Lance Taylor 8cce671843 Fix buglet in last patch. 2007-12-20 21:26:17 +00:00
Ian Lance Taylor fe8718a463 Convert more instances of off_t to be 32-bit types. 2007-12-20 21:21:24 +00:00
Ian Lance Taylor 1e9836570f Update comments about output offsets and merged input sections. 2007-12-20 16:27:34 +00:00
Ian Lance Taylor 4106a0814a Remove one inline. 2007-12-20 01:32:10 +00:00
Ian Lance Taylor 8f00aeb8a6 Make functions on hot path inline. Remove a mistaken virtual
declaration.
2007-12-20 01:29:04 +00:00
Ian Lance Taylor 2030fba084 Move Stringpool offsets into a chunked_vector indexed by keys. 2007-12-19 01:23:46 +00:00
Ian Lance Taylor 9bb53bf8b8 Avoid some warnings which showed up in 64-bit mode. 2007-12-19 01:18:41 +00:00
Ian Lance Taylor c0873094f5 Use string length when available when calling Stringpool. Compare
pointers first when looking up Stringpool entries.
2007-12-19 00:29:28 +00:00
Ian Lance Taylor 0205c1752c Don't write unattached after_input sections twice. 2007-12-18 21:45:28 +00:00
Ian Lance Taylor 38c5e8b493 Print statistics about merge sections with --stats. 2007-12-18 21:24:10 +00:00
Ian Lance Taylor 8383303e0a Add section_size_type and section_offset_type, use them to replace a
lot of instances of off_t.
2007-12-18 00:48:04 +00:00
Ian Lance Taylor 281b8327ae Minor speedup to Output_merge_string::do_add_input_section. 2007-12-15 01:01:48 +00:00
Ian Lance Taylor 17a1d0a9b2 Rewrite workqueue. This version eliminates the master thread, and
reduces the amount of locking required to find a new thread to run.
2007-12-14 19:00:21 +00:00
Ian Lance Taylor 7004837e8d Add const to Object::read and Object::sized_target. 2007-12-14 18:50:01 +00:00
Ian Lance Taylor c71c6f566c Make some File_read methods const. 2007-12-14 18:22:06 +00:00
Ian Lance Taylor 0e470e5c90 Add some missing dependencies for the new linker. 2007-12-14 05:27:45 +00:00
Ian Lance Taylor 6d01333390 From Craig Silverstein: size hash tables to avoid resizing. 2007-12-14 05:24:17 +00:00
Ian Lance Taylor 460c00b558 Fix --thread-count-middle and --thread-count-final. 2007-12-14 04:53:22 +00:00
Ian Lance Taylor c03c769248 From Cary Coutant: Test TLS initial-exec model. 2007-12-11 23:33:11 +00:00
Ian Lance Taylor 535890bb64 From Cary Coutant: Set DF_STATIC_TLS as appropriate. 2007-12-11 23:30:52 +00:00
Ian Lance Taylor 31d6048054 From Cary Coutant: Fix x86_64 TLS problem. 2007-12-11 21:21:14 +00:00
Ian Lance Taylor 9430daf83a From Craig Silverstein: Speed up ODR violation reporting. 2007-12-11 18:17:31 +00:00
Ian Lance Taylor 94c4710f80 From Cary Coutant: Handle TLS entry for TLS module index. 2007-12-11 04:23:05 +00:00
Ian Lance Taylor fcf29b2415 Keep views on views_ list so that they can be found again. 2007-12-10 22:55:31 +00:00
Craig Silverstein 53765ea3d7 Released gold-alpha 0.9. 2007-12-08 03:17:25 +00:00
Ian Lance Taylor bc2c67ffde From Craig Silverstein: Fix error message, add this->. 2007-12-08 03:05:27 +00:00
Ian Lance Taylor 6a41d30bc2 From Cary Coutant: Fix x86_64 TLS. Also set DT_TEXTREL as well as
DF_TEXTREL.
2007-12-07 23:26:51 +00:00
Ian Lance Taylor e8c846c359 From Cary Coutant: Fix handling of RELATIVE RELA relocs. 2007-12-07 19:32:59 +00:00
Ian Lance Taylor 4117d76827 Fix ehframe header handling for shared libraries. 2007-12-07 06:44:01 +00:00
Ian Lance Taylor 78d911fd3e From Cary Coutant: Some x86_64 shared library fixes. 2007-12-07 00:59:31 +00:00
Ian Lance Taylor ac1f0c21ae From Cary Coutant: Remove commented out assert. Also add comment for
bitfield check.
2007-12-07 00:54:28 +00:00
Ian Lance Taylor 351a80002a From Craig Silverstein: Reorganize testsuite Makefile.am. 2007-12-06 17:07:24 +00:00
Ian Lance Taylor f2619d6c3b Initialize variable to avoid warning. 2007-12-06 06:03:00 +00:00
Ian Lance Taylor 7bf1f8020f From Cary Coutant: More support for generating shared libraries. 2007-12-06 05:55:50 +00:00
Ian Lance Taylor fd6940ea27 Fix comment. 2007-12-06 05:27:24 +00:00
Ian Lance Taylor 116724f39d Don't write out the symbol table when stripping. 2007-12-06 05:00:00 +00:00
Ian Lance Taylor 987cc25110 Rework Stringpool to not compute the hash code twice when adding a new
string.
2007-12-05 22:56:51 +00:00
Ian Lance Taylor 42a1b6860d From Craig Silverstein: Support -o -. 2007-12-05 01:13:28 +00:00
Ian Lance Taylor 43771f7638 From Craig Silverstein: Test some flags. 2007-12-05 01:10:16 +00:00
Ian Lance Taylor ad8f37d1ba Stringpool stats. Also make Symbol_table support functions inline. 2007-12-05 00:48:49 +00:00
Ian Lance Taylor c420411fe8 From Craig Silverstein: Support irregular output files. 2007-12-04 23:42:28 +00:00
Ian Lance Taylor abaa399568 Print symbol table statistics with --stats. 2007-12-04 23:11:35 +00:00
Ian Lance Taylor 3ae7da37eb From Craig Silverstein: Use gold_fatal in options.h, beef up value checks. 2007-12-04 01:30:46 +00:00
Ian Lance Taylor be00d4e7ff More -fPIC options. 2007-12-01 06:53:32 +00:00
Ian Lance Taylor 763277c3c4 Add missing space. 2007-12-01 06:51:45 +00:00
Ian Lance Taylor c92003e082 Compile shared library code with -fPIC. Also, alphabetize. 2007-12-01 06:50:09 +00:00
Ian Lance Taylor ae3e2ab146 Add casts to avoid warnings. 2007-12-01 06:45:21 +00:00
Ian Lance Taylor 96803768f1 Compress all debug sections. 2007-12-01 06:34:12 +00:00
Ian Lance Taylor b589a5bc29 From Cary Coutant: Avoid compilation warnings if no zlib.h. 2007-11-30 22:38:01 +00:00
Ian Lance Taylor 9a0910c33e From Craig Silverstein: Add support for compressing .debug_str section. 2007-11-30 00:35:27 +00:00
Ian Lance Taylor 27bc2bce09 Clean up setting address and section offset. 2007-11-29 20:10:17 +00:00
Ian Lance Taylor 2d6840917d Don't try to delete the output file if we don't know its name yet. 2007-11-28 19:39:40 +00:00
Ian Lance Taylor ef04e3921e From Craig Silverstein: Fix up comments. 2007-11-28 19:38:35 +00:00
Ian Lance Taylor 79e052eafd From Craig Silverstein: Better handling of ODR violations which are
not in a function.
2007-11-28 18:01:06 +00:00
Ian Lance Taylor 4625f782a5 Rework merge_map for speed. 2007-11-27 06:13:33 +00:00
Ian Lance Taylor d8a8897678 Make Merge_key_less operator() inline. 2007-11-22 00:45:46 +00:00
Ian Lance Taylor c79126688f Add threading support. 2007-11-22 00:05:51 +00:00
Ian Lance Taylor 4f833eee90 From Craig Silverstein: Also set entsize for .debug_str sections. 2007-11-20 04:26:15 +00:00
Ian Lance Taylor 44a43cf96f From Craig Silverstein: Force .debug_str sections to be SHF_MERGE and
SHF_STRINGS.
2007-11-19 22:49:38 +00:00
Ian Lance Taylor dd8670e56c From Craig Silverstein: Quote the symbol name in the ODR violation
message to avoid a gcc collect2 demangling bug.
2007-11-17 02:49:22 +00:00
Craig Silverstein c282462d03 Released gold 0.8 2007-11-16 21:18:22 +00:00
Ian Lance Taylor 3e95a404c8 Ignore empty archives. 2007-11-16 18:44:20 +00:00
Ian Lance Taylor ff541f308a When looking for ODR violations, only check the file base name. Also,
never demangle if --no-demangle was used.
2007-11-16 16:54:19 +00:00
Ian Lance Taylor 124dfc8994 DW_LNE_end_sequence indicates that the address points to the byte
*after* the current target sequence.
2007-11-16 06:47:53 +00:00