X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tsHSK7+rFjtz/wvlBeF1Au6/3Wzu+JCMMBv+wOLX4fc=; b=fRgNsnXs9BFtr7RuKLkHHETu0Mc9N0PvVwQfWYEk7PAlPugQcn1b7YAuBKFXBK+MbV hgJr6iaoIiz4z3Jadib2muezr7WlTnAnW1ngHTUYI5xblP2FTKOwbPwnobtv5obDVhjl HMQvGR3uDzl/5gC2ICtj4zv7RMUdRSr43nhhs3XXWsukKNVB9Bh6olO5z0TovkUmMhPg z7y5OBPn82aOdP6oxm4+AxdWkMwlthrZFR43forz6zn2NfsZpOyeAQbYRG7fnDD4s1ZZ DNpvJQUpqFSc8g5FVigKDL71lLnO6shQX5WBJuF4h4LolQ3o9PmXdKTVF2Rog/Axu8Xu f7kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tsHSK7+rFjtz/wvlBeF1Au6/3Wzu+JCMMBv+wOLX4fc=; b=nxwW1VibUaDwh28LNmA64JrQTr7Ki8muoYS1cZ/wqJ0QMzWQ2wTkWdLUAMRAPxeCGS WStZkdrzdxXu0UIAs9Tqc8mlPvRLtphJy7PYaDzXysTM47QiGumWZMoserp6ZRgebS9m 5pTbQNuJvcE/wQPhkm1NdYR40WLnFIScKDNLzD50PQTEz5hVB1rZYzKidtcXJ1awmCY/ 5xvkc7ebCeyazDS/gwa1Z6bVl/8ZKStdyFE8lKWS6NpTogqV3/TPxrp1aKkUmwk/eHox +C4T0o9mvxY8zEdv/1Aw9I3JK7tbytgPqFBJNQ4YYJaW7gTuiy8hG7gRxXtrd0TBkxzX 2lmQ== X-Gm-Message-State: AFqh2kogACqv3fosO68GAYnPAbJSx5A8Eorccu47+WW7K5ztVyge+4og 69lunWa++LmbV9H0ahizqYq0gbuTt3RJqA== X-Google-Smtp-Source: AMrXdXvJ7cE2XmIqR//HBYoKOf0w5L4xYZeHy8HTG9gyx0XMVTh9gqbc1r7Yuz7uMGsuCiSmjrxMew== X-Received: by 2002:a05:6402:4d6:b0:46c:6ed1:83ac with SMTP id n22-20020a05640204d600b0046c6ed183acmr36071384edw.9.1674699860888; Wed, 25 Jan 2023 18:24:20 -0800 (PST) Message-ID: Date: Thu, 26 Jan 2023 03:24:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: DXE3 with std::vector Content-Language: en-US From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com References: <63a56722-21d6-a368-6400-907f0cf9d01c AT gmail DOT com> <3b8f674c-bca3-c679-952e-f8ba5af196e7 AT gmail DOT com> <61e4c33f-af61-5828-5737-bcf05707ab4a AT gmail DOT com> <0ad038e8-d542-a265-63f8-0ca0b80dc627 AT gmail DOT com> In-Reply-To: <0ad038e8-d542-a265-63f8-0ca0b80dc627@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com On 2023-01-25 21:22, J.W. Jagersma wrote: > On 2023-01-25 20:25, Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: >> On 1/25/23, Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via >> djgpp AT delorie DOT com] wrote: >>> On 1/23/23 20:06, J.W. Jagersma (jwjagersma AT gmail DOT com) [via >>> djgpp AT delorie DOT com] wrote: >>>> On 2023-01-23 05:00, Ozkan Sezer (sezeroz AT gmail DOT com) [via >>>> djgpp AT delorie DOT com] wrote: >>>>> The thing is, dxe3gen invokes ld, not gcc. gcc is a front-end to ld >>>>> and handles any such ugliness behind the scene and doing the same for >>>>> dxe3gen might be a real pain. >>>> I think the tricky part is to prevent gcc from invoking stubify on the >>>> resulting object file. Otherwise, it doesn't look too difficult. Just >>>> replace >>>> param sequences such as "-T" "dxe.ld" with "-Wl,-T,dxe.ld". The same can >>>> be >>>> done for DXE_AS. >>> It is should be easy: >>> >>> 1) dump GCC specs (gcc -dumpspecs >some_file >>> >>> 2) delete next line after line containing '*post_link:' >>> >>> 3) use that file in -T option >>> >>> >>> Andris >> >> No '*post_link:' in my gcc's dumpspecs (gcc-3.4.6, cross- from linux.) > > I think Andris added the post_link step somewhere in 4.x, earlier versions do > not call stubify. So that doesn't require any special code. Sorry, that's incorrect, earlier versions *do* call stubify, but via link_command. I thought they used the stub that ld attaches. So, if gcc < 4.x must be supported, that does make things more complicated.