[PATCH] D42960: [ELF] DEMO: Example for adding .eh_frame pieces to map file
    Rafael Avila de Espindola via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar  2 12:20:59 PST 2018
    
    
  
I like the format change. Rui?
Andrew Ng via Phabricator via llvm-commits <llvm-commits at lists.llvm.org>
writes:
> +      if (IS == InX::EhFrame) {
> +        uint64_t InputStart = 0, InputEnd = 0, OutputStart = 0, OutputEnd = 0;
> +
> +        auto AddEntry = [&](InputSectionBase *IS) {
> +          writeHeader(OS, (OSec->Addr + OutputStart), (OutputEnd - OutputStart),
> +                      IS->Alignment);
> +
> +          std::string InputName = toString(IS);
> +          if (InputStart) {
> +            auto Pos = InputName.size();
> +            if (Pos && (InputName.back() == ')'))
> +              --Pos;
> +            InputName.insert(Pos, "+0x" + utohexstr(InputStart, true));
> +          }
This is the only part that feel a bit of a hack. Could we pass the offset
to toString instead?
Cheers,
Rafael
    
    
More information about the llvm-commits
mailing list