This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 12001, --defsym


On Sun, Dec 19, 2010 at 10:30 PM, Alan Modra <amodra@gmail.com> wrote:
> This patch reverts Nick's support for early --defsym symbol creation,
> and instead implements the same in open_input_bfds. ?This is quite a
> lot simpler, but the main reason for this patch is that I want to run
> a pass over assignments early. ?The idea being to control ld
> expression behaviour by a magic assignment in a linker script. ?One of
> the benefits is that --defsym is restored to acting at the point it is
> used on the command line, for example
> ?--defsym x=1 some_script --defsym x=2 some_script
> could control actions in "some_script". ?This positional behaviour
> will also affect extraction of objects from archives.
>
> ld/
> ? ? ? ?PR ld/12001
> ? ? ? ?Revert 2010-11-03 Nick Clifton
> ? ? ? ?* ldlang.c (ldlang_def_chain_list): Delete.
> ? ? ? ?(insert_defined, ldlang_add_def, lang_place_defineds): Delete.
> ? ? ? ?(lang_process): Don't call lang_place_defineds.
> ? ? ? ?(lang_add_assignment): Don't do anything special for --defsym.
>
> ? ? ? ?* ldexp.h (struct ldexp_control): Add uses_defined.
> ? ? ? ?(exp_fold_tree_no_dot): Declare.
> ? ? ? ?* ldexp.c (exp_fold_tree): Clear uses_defined.
> ? ? ? ?(exp_fold_tree_no_dot): Likewise. ?Make global.
> ? ? ? ?(fold_name <DEFINED>): Set uses_defined.
> ? ? ? ?(exp_fold_tree_1 <etree_assign>): Define symbol during first phase
> ? ? ? ?even when the value being assigned isn't valid.
> ? ? ? ?* ldlang.c (open_input_bfds): Process assignment statements.
> ? ? ? ?(lang_process): Bump lang_statement_iteration.
> ? ? ? ?(scan_for_self_assignment): Formatting.
> ? ? ? ?(print_assignment): Style.
>

This caused:

http://sourceware.org/bugzilla/show_bug.cgi?id=12356


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]